daithi-coombes / api-connection-manager

Manages connections and requests to 3rd party providers or services
0 stars 1 forks source link

look over db model #92

Closed daithi-coombes closed 11 years ago

daithi-coombes commented 11 years ago

when trying to remove references to api-con-mngr in the db, the following tables were found. This may need refactoring for redundant code, or have redundant data, as connection information for users is stored in wp_sitemeta,wp_options,wp_16_options

        /**
         * tables where data is stored
         *
         * wp_usermeta:
         *  meta_key: API_Con_Mngr_Module-{$slug}
         *  meta_val: hash{ connection info for user }
         *  user_id: int( user_id connections belong to )
         *
         * wp_sitemeta:
         *  meta_key: API_Con_Mngr_Module
         *  meta_value: hash( client_id, client_secret, endpoints )
         *  meta_key: API_Con_Mngr_Module-connections
         *  meta_value: hash( $user_id:$slug:$profile_id )
         *
         * wp_options:
         *  meta_key: API_Con_Mngr_Module-connections
         *  meta_value: hash( $user_id:$slug:$profile_id )
         *
         * wp_16_options:
         *  meta_key: API_Con_Mngr_Module-connections
         *  meta_value: hash( $user_id:$slug:$profile_id )
         */
daithi-coombes commented 11 years ago

wp_usermeta should have only one record per user, with profile, token and connection information - not one record per connection. ie $slug{ tokens }

daithi-coombes commented 11 years ago

issue moved to https://github.com/api-connection-manager/api-connection-manager/