mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-06-21 03:55:39 +02:00
23 lines
528 B
Python
23 lines
528 B
Python
# 015_account.py
|
|
|
|
def migrate(migrator, database, fake=False, **kwargs):
|
|
|
|
|
|
migrator.sql("""CREATE TABLE account(
|
|
id serial PRIMARY KEY NOT NULL,
|
|
devid bigint REFERENCES devices(id),
|
|
message text,
|
|
action text,
|
|
section text,
|
|
username text,
|
|
config text,
|
|
address text,
|
|
ctype text,
|
|
created timestamp not null default CURRENT_TIMESTAMP
|
|
)""")
|
|
|
|
|
|
def rollback(migrator, database, fake=False, **kwargs):
|
|
|
|
migrator.sql("""DROP TABLE account""")
|
|
|