mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-07-12 23:14:35 +02:00
18 lines
503 B
Python
18 lines
503 B
Python
|
# 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""")
|
||
|
|
||
|
|