History of TikiWashed

As an experiment related to our recent discussion about database column names I created a simple script which uses a search and replace utility to recursively replace all camelCapped column names so they would appear as: camel_capped. I used [http://chxo.com/be2/software/galactron/search_and_r_4284.html|this great utility] to do the searching/replacing. Here is an excerpt from the script:

Upgrading from Bonnie to ReleaseOne? Check out ((BonnieToReleaseOne)) for a script to update your database for use with a ReleaseOne install.

# tiki_categorized_objects
rrpl.sh catObjectId cat_object_id
rrpl.sh objId obj_id

# tiki_category_sites
rrpl.sh siteId site_id

# tiki_chart_items
rrpl.sh itemId item_id

# tiki_charts
rrpl.sh chartId chart_id
rrpl.sh singleItemVotes single_item_votes
rrpl.sh singleChartVotes single_chart_votes
rrpl.sh autoValidate auto_validate
rrpl.sh topN top_n
rrpl.sh maxVoteValue max_vote_value
rrpl.sh showAverage show_average
rrpl.sh isActive is_active
rrpl.sh showVotes show_votes
rrpl.sh useCookies use_cookies
rrpl.sh lastChart last_chart
rrpl.sh voteAgainAfter vote_again_after

# tiki_charts_rankings
rrpl.sh lastPosition last_position

# tiki_chat_channels
rrpl.sh channelId channel_id

# tiki_chat_messages
rrpl.sh messageId message_id
rrpl.sh channelId channel_id

and here is rrpl.sh (probably could have just used an alias):
rpl -R $1 $2 *

It does a case-sensitive search and replace on all offending column names. Inital results look good. Fresh install went fine and nothing seems to be broken. Some variable names were changed as a side-effect (e.g. anywhere we had a variable named $blogId would now be $blog_id)

You can find the results of these changes [http://www.bitweaver.org/builds/tikiwashed.tgz|here]. If possible we should hammer away and make sure nothing was inadvertently broken. I tried to be as accurate as possible when writing the script but there is a chance of a misspelling in one of the 500+ lines. Anyone want to proof-read? (:wink:) __SEWilco: fixed spelling in this paragraph__ (:cool:)
Page History
07 May 2004 (20:47 UTC)
Andrew Slater66.193.5.505
Current • Source
View • Compare • Difference • Source