mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-06-21 03:55:39 +02:00
18 lines
402 B
Python
18 lines
402 B
Python
# 023_snippets.py
|
|
|
|
def migrate(migrator, database, fake=False, **kwargs):
|
|
|
|
|
|
migrator.sql("""CREATE TABLE snippets(
|
|
id serial PRIMARY KEY NOT NULL,
|
|
name text,
|
|
description text,
|
|
content text,
|
|
created timestamp not null default CURRENT_TIMESTAMP
|
|
)""")
|
|
|
|
|
|
def rollback(migrator, database, fake=False, **kwargs):
|
|
|
|
migrator.sql("""DROP TABLE snippets""")
|
|
|