mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-07-21 19:24:26 +02:00
MikroWizard Initial commit | MikroMan Welcome to the world :)
This commit is contained in:
commit
8c49b9a55d
96 changed files with 12274 additions and 0 deletions
23
migrations/010_account.py
Normal file
23
migrations/010_account.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# 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""")
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue