Slide 39
Slide 39 text
ALTER
schema.alter( "users", function( table ) {
table.addColumn( table.boolean( "is_active" ) );
table.modifyColumn( "age", table.integer( "age", 3 ) );
table.renameColumn( "name", table.string( "username" ) );
table.dropColumn( "last_logged_in" );
table.addConstraint( table.unique( "username" ) );
table.dropConstraint( "full_constraint_name" );
table.dropConstraint( table.foreignKey( "country_id" ) );
table.renameConstraint( "unq_users_first_name_last_name", "unq_users_full_name" );
} );
▸ Alter methods take the same column definition as create