Jump to content

making myself backward compatible?


michaellunsford

Recommended Posts

About three years ago I made a table that has since been populated with hundreds of records and is in use by numerous websites. I want to completely redo the entire database structure -- going from a relitively flat format to relational. Of course, the problem is I don't want to recode all those websites.

so, question: Can I turn the old table into an 'alias' table? That somehow refers to certain fields in the new table? That way the old stuff still works, and I can use the extended features for all the new stuff?
Link to comment
Share on other sites

Instead of making an alias table, I thought to just upgrade the existing table with the new features. This would ensure backward compatibility with old stuff, but would require duplicate entry of certain fields.

In the example, the old `name` field would become two fields `first_name` and `last_name`. To maintain backward-compatibility with the older PHP code, I figured I could just write it into the new code.

So, the new PHP code (which uses the new fields) could combine the `first_name` and `last_name` fields and write it to the old `name` field. That way, the old PHP code would still function normally, even on the new fields. This does seem a bit round-about, so I was wondering if MySQL could do this automatically?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.