mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-07-03 02:24:30 +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
22
migrations/006_tasks.py
Normal file
22
migrations/006_tasks.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
# 006_tasks.py
|
||||
|
||||
def migrate(migrator, database, fake=False, **kwargs):
|
||||
|
||||
# an example class for demonstrating CRUD...
|
||||
|
||||
migrator.sql("""CREATE TABLE tasks(
|
||||
id serial PRIMARY KEY NOT NULL,
|
||||
signal int UNIQUE,
|
||||
name text,
|
||||
starttime timestamp not null default CURRENT_TIMESTAMP,
|
||||
endtime timestamp not null default CURRENT_TIMESTAMP,
|
||||
status boolean
|
||||
)""")
|
||||
|
||||
|
||||
|
||||
def rollback(migrator, database, fake=False, **kwargs):
|
||||
|
||||
migrator.sql("""DROP TABLE tasks""")
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue