from orator.migrations import Migration class CreateMessagesTable(Migration): def up(self): """ Run the migrations. """ with self.schema.create('messages') as table: table.increments('id') table.string('filename') table.string('folder').references('name').on('folders') table.string('subject', 1023).nullable() table.datetime('date').nullable() table.string('content_type') def down(self): """ Revert the migrations. """ self.schema.drop('messages')