MikroWizard Initial commit | MikroMan Welcome to the world :)

This commit is contained in:
sepehr 2024-07-20 15:48:46 +03:30
commit 8c49b9a55d
96 changed files with 12274 additions and 0 deletions

20
migrations/008_backups.py Normal file
View file

@ -0,0 +1,20 @@
# 013_backups.py
def migrate(migrator, database, fake=False, **kwargs):
# an example class for demonstrating CRUD...
migrator.sql("""CREATE TABLE backups(
id serial PRIMARY KEY NOT NULL,
devid bigint REFERENCES devices(id),
dir text,
filesize int,
created timestamp not null default CURRENT_TIMESTAMP
)""")
def rollback(migrator, database, fake=False, **kwargs):
migrator.sql("""DROP TABLE backups""")