php - Start using Migrations mid way through a Laravel app -


in midst of developing laravel 4 app, i've decided start making use of laravel's migration feature.

question: should write migrations creating tables have in database? or write migrations future changes?

there no complete right answer this. depends on lot of variables, style of development, how many people you're working , in kind of environment (single production db? multiple dev dbs?), requirements migrations are, etc. etc.

if do decide write migrations entire db until point, you'll need make sure migrations can handle potential conflicts. making use of schema::has() , such verify tables exist prior attempting create them, , such.

alternatively, can write migrations if db has clean slate, , enforce devs start empty db prior running migrations. has risks, careful. make sure have backups in case migration forgot , need modify it.

so, tl;dr: using migrations entire structure part way through project bad thing? no. right application? entirely depends.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -