blob: b95aa50a7eabde15b04b94ee0e2242dce2dc2cc3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
from orator.migrations import Migration
class CreateVersesTable(Migration):
def up(self):
"""
Run the migrations.
"""
with self.schema.create('verses') as table:
table.string('book')
table.small_integer('chapter')
table.small_integer('nr')
table.foreign('book').references('canonical_name').on('books')
table.primary(['book', 'chapter', 'nr'])
def down(self):
"""
Revert the migrations.
"""
self.schema.drop('verses')
|