Page 1 of 1

how do update a database without wiping out the entire DB

Posted: Sun Feb 26, 2017 11:24 am
by gautamz07
I currently update my database my exporting it in PHP admin from my local setup and then importing my database on my server online , This wipes out all the entries on my online database.

ususally since i am still working on my blog , i just need to update a columb etc , so how do update a database without wiping out the entire databsse online ?

Thank you.
Gautam.

Re: how do update a database without wiping out the entire D

Posted: Sun Feb 26, 2017 2:46 pm
by requinix
Use statements like ALTER TABLE to change columns.

Re: how do update a database without wiping out the entire D

Posted: Sun Feb 26, 2017 6:45 pm
by Celauran
You might want to consider using migrations. Laravel has them built in, or you can use something like Phinx.

Re: how do update a database without wiping out the entire D

Posted: Sun Feb 26, 2017 11:13 pm
by gautamz07
@requinix Thanks , though i am not directly writeing the sql to my production database.

@celauran ! thats totally skipped me , thanks , will try and use migrartions , chekced out phinx , its nice TY :)