mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-07-23 12:16:18 +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
17
migrations/019_device_radio.py
Normal file
17
migrations/019_device_radio.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
# 038_device_radio.py
|
||||
|
||||
def migrate(migrator, database, fake=False, **kwargs):
|
||||
migrator.sql("""CREATE TABLE device_radio(
|
||||
id serial PRIMARY KEY NOT NULL,
|
||||
devid bigint REFERENCES devices(id),
|
||||
peer_dev_id bigint REFERENCES devices(id),
|
||||
data text,
|
||||
external_id text,
|
||||
mac text,
|
||||
created timestamp not null default CURRENT_TIMESTAMP
|
||||
)""")
|
||||
|
||||
def rollback(migrator, database, fake=False, **kwargs):
|
||||
migrator.sql("""DROP TABLE device_radio""")
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue