• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database updates for live application


I've been using Codeigniter for the past year and and currently have my application in beta testing. I've had a couple of issue here and there updating the database.

First method i tried was upon update ( ajax call from client to my server ) include a file in the update with some queries which was included after all the files were downloaded. I've had some issues there due to php limits, depending also on the update size.

Second method ( the one i currently use ) is using hooks. Checking if a certain file exists ( which i include in the update files ) that contains queries. If so include it and run those queries and do the DB changes. I've had better success with this overall ( less complains ) but still if a query happens to fail 1st i'm not able to see which one and second of all if an error happens and stops then on refresh i'll run the queries again until the error and so on. So there is no way out.

Now i've looked into Codeigniter Migrations and will probably head that way.

I just want to know if what everybody else is using and maybe some tips on the Migrations or if i should follow something else.

Thank you in advance
"The Most Important Thing In Life Is Showing Up"
"I Just Had A Bad Day"
"We'll Be Back"
"Further Beyond"

if you want to this with the CI-way you need to this with migrations everything else would be reinventing the wheel
and migrations with the up/down principle are really fine - just do a few tests on your own and i'm sure you'll understand pretty fast what it does

It's just that we are about to leave the beta and i've already abandoned one and about to abandon another method for updating and don't really wanna go live and the having to change it again in a few weeks.

Thank you though, that's the way i'll probably follow.
"The Most Important Thing In Life Is Showing Up"
"I Just Had A Bad Day"
"We'll Be Back"
"Further Beyond"

We mostly run our update queries manually at phpmyadmin's SQL tab. Each table (about 100) in our database has a log file, and we always know what happened and when. In 4 years, we've never needed to back out a change, and we've also never needed to look back. In our case, using migrations or something else would just be a waste of time.

that depends - we experienced the problem of the centralization
each developer who changes the db can do this, but our problem was to organize that
and in order to organize that you need something centralized and automated

we have our entire database in our CI migration environment
each time we change something we do it in this migration script commit to the svn/git rep and any other developer can use it without much effort on his local environment

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.