mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-06-26 07:08:36 +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_sqlite/001_init.py
Normal file
23
migrations_sqlite/001_init.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# 001_init.py
|
||||
|
||||
def migrate(migrator, database, fake=False, **kwargs):
|
||||
"""Write your migrations here."""
|
||||
|
||||
migrator.sql("""CREATE TABLE users (
|
||||
|
||||
id INTEGER PRIMARY KEY,
|
||||
|
||||
created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
email text UNIQUE,
|
||||
password text,
|
||||
first_name text,
|
||||
last_name text,
|
||||
role text DEFAULT 'readonly',
|
||||
tags text
|
||||
)""")
|
||||
|
||||
def rollback(migrator, database, fake=False, **kwargs):
|
||||
"""Write your rollback migrations here."""
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue