mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-06-24 14:18:40 +02:00
20 lines
540 B
Python
20 lines
540 B
Python
|
|
# 003_sysconfig.py
|
|
|
|
def migrate(migrator, database, fake=False, **kwargs):
|
|
|
|
# an example class for demonstrating CRUD...
|
|
|
|
migrator.sql("""CREATE TABLE sysconfig(
|
|
id serial PRIMARY KEY NOT NULL,
|
|
key text UNIQUE,
|
|
value text,
|
|
created_by uuid REFERENCES users(id),
|
|
created timestamp not null default CURRENT_TIMESTAMP,
|
|
modified timestamp not null default CURRENT_TIMESTAMP
|
|
)""")
|
|
|
|
def rollback(migrator, database, fake=False, **kwargs):
|
|
|
|
migrator.sql("""DROP TABLE sysconfig""")
|
|
|