Migrate Up

The up() method in a migration file is typically used for creating things. e.g. new tables, new columns, indexes etc. whereas the down method is used for reversing those changes i.e. dropping tables and columns etc.

We've already said that we want our system to be database agnostic so we will use the methods on a Doctrine Schema object to create our tables and columns instead of writing the SQL ourselves.

The fact that our migration files return an object will make it really easy to just require the file and call the up method on the returned object.

Complete and Continue  
Discussion

2 comments