ansonphong / postworld

Wordpress Theme Development Framework
GNU General Public License v2.0
7 stars 0 forks source link

Points & Naming Schema Change #5

Closed ansonphong closed 11 years ago

ansonphong commented 11 years ago

Hi Haidy, With your good idea to use foreign keys for the database, I have also described a way to implement these on functions and table names. I should have thought of this earlier, although it was very good that you pointed this out.

Also with the addition of some functions (which we will add later) for managing comment_points, as well as post_points, we will have to build in this differentiation at the global level.

For updated info, including data for the naming schema and new tables, see this documentation : https://www.evernote.com/shard/s275/sh/7fd5bb62-0902-4050-9889-338f847d044c/5fe6f3da3510557663e8693251ac8557

POINTS SCHEMA CHANGE

TABLE CHANGES • 'wp_postworld_points' >> rename to >> 'wp_postworld_post_points' • 'wp_postworld_meta' >> rename to >> 'wp_postworld_post_meta' • create 'wp_postworld_comment_points' table • create 'wp_postworld_comment_meta' table

COLUMN CHANGES • in table 'wp_postworld_post_points' : column 'points' >> rename to >> 'post_points' • in table 'wp_postworld_post_meta' : column 'points' >> rename to >> 'post_points' • in table 'wp_postworld_user_meta' : ++ add 'post_points' column and 'comment_points' column

_FUNCTION NAME CHANGES _ • 'get_points()' >>>> >> rename to >> 'get_post_points()' • 'calculate_points ()' >> rename to >> 'calculate_post_points ()' • 'cache_points ()' >> rename to >> 'cache_post_points ()' • 'set_points()' >> rename to >> 'set_post_points()' • 'has_voted()' >> rename to >> 'has_voted_on_post()' • 'get_user_points()' >> rename to >> 'get_user_points_voted_to_posts()' • 'get_user_votes()' >> rename to >> 'get_user_votes_on_posts()'

hmikhail commented 11 years ago

solved in commit 5f04e2c2fb3d74184bdc6907c1dff9ca8182e31e