MikroWizard Initial commit | MikroMan Welcome to the world :)
This commit is contained in:
commit
8c49b9a55d
96 changed files with 12274 additions and 0 deletions
20
migrations_sqlite/002_movies.py
Normal file
20
migrations_sqlite/002_movies.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# 002_movies.py
|
||||
|
||||
def migrate(migrator, database, fake=False, **kwargs):
|
||||
|
||||
migrator.sql("""CREATE TABLE movies(
|
||||
id INTEGER PRIMARY KEY,
|
||||
|
||||
created timestamp not null default CURRENT_TIMESTAMP,
|
||||
modified timestamp not null default CURRENT_TIMESTAMP,
|
||||
|
||||
creator integer REFERENCES users(id),
|
||||
|
||||
title text,
|
||||
director text
|
||||
)""")
|
||||
|
||||
def rollback(migrator, database, fake=False, **kwargs):
|
||||
|
||||
migrator.sql("""DROP TABLE movies""")
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue