lnbits-legend/lnbits/extensions/tpos/migrations.py

23 lines
407 B
Python
Raw Normal View History

2020-04-16 15:23:38 +02:00
from lnbits.db import open_ext_db
def m001_initial(db):
"""
Initial tposs table.
"""
2020-04-17 20:39:23 +02:00
db.execute(
"""
2020-04-16 15:23:38 +02:00
CREATE TABLE IF NOT EXISTS tposs (
id TEXT PRIMARY KEY,
wallet TEXT NOT NULL,
name TEXT NOT NULL,
currency TEXT NOT NULL
);
2020-04-17 20:39:23 +02:00
"""
)
2020-04-16 15:23:38 +02:00
def migrate():
with open_ext_db("tpos") as db:
m001_initial(db)