Jump to content

How to run database migrations?


Alexander

Recommended Posts

I need to add new columns to some of the core tables. For development I use the 4.1.5-dev(latest master branch). Following these instructions I created new migration files but when I perform an upgrade or install my database changes aren't applied. To upgrade the adserver I follow these instructions, however I'm not sure that is the correct way to run migrations for developers.

As for new install I managed to get my database updated by executing this script `scripts/upgrade/buildXmlCache.php`. It created a set of *.bin files which probably are required for installation. But it didn't help for the upgrade process. The database stays at the 623 version.

Link to comment
Share on other sites

  • 2 weeks later...

Hi @Alexander,

If you are doing this as a custom development, I would probably avoid using the core migration system, as it will render your system unable to upgrade in the future - we're likely to want to re-use your migration numbers, and things will conflict.

If you can, I'd also suggest that you don't add columns to the core tables - this may have a similar effect with rendering upgrades impossible.

Better if you can create separate tables for your data, and join the data using the relevant IDs.

Link to comment
Share on other sites

  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...