mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-08-29 22:19:27 +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
20
migrations/018_syslogs.py
Normal file
20
migrations/018_syslogs.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# 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""")
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue