imaginaryfriend/migrations/2016_10_31_02_create_words_...

19 lines
386 B
Python

from orator.migrations import Migration
class CreateWordsTable(Migration):
def up(self):
"""
Run the migrations.
"""
with self.schema.create('words') as table:
table.increments('id')
table.string('word').unique()
def down(self):
"""
Revert the migrations.
"""
self.schema.drop('words')