mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-06-26 07:08:36 +02:00
20 lines
473 B
Python
20 lines
473 B
Python
# 038_syslogs.py
|
|
|
|
def migrate(migrator, database, fake=False, **kwargs):
|
|
migrator.sql("""CREATE TABLE syslogs(
|
|
id serial PRIMARY KEY NOT NULL,
|
|
user_id uuid REFERENCES users(id),
|
|
action text,
|
|
section text,
|
|
data text,
|
|
ip text,
|
|
agent text,
|
|
created timestamp not null default CURRENT_TIMESTAMP
|
|
)""")
|
|
|
|
|
|
def rollback(migrator, database, fake=False, **kwargs):
|
|
|
|
migrator.sql("""DROP TABLE syslogs""")
|
|
|
|
|