dick
04/13/2022, 2:33 PMqb
schema builder can I capture and dump the SQL
produced by a schema.alter()
so I can replay it on my prod db?elpete
04/13/2022, 6:05 PMexecute
to false
then you get back a SchemaBuilder
object that you can call toSQL()
on.dick
04/14/2022, 7:55 AMfunction up( schema ) {
var query = schema.alter( 'members', function ( table ) {
table.addColumn( table.unsignedInteger( 'distributionRound' ).nullable() );
} );
writedump( var='#query.toSQL()#', output='console' );
}
elpete
04/14/2022, 12:49 PMexecute = false
to the alter call.dick
04/14/2022, 1:19 PM