Creation of the schema_migrations table refactored

./script/migrate creates the schema_migrations table when it doesn't exist