mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-23 22:47:05 +01:00
22 lines
500 B
Python
22 lines
500 B
Python
from lnbits.db import open_ext_db
|
|
|
|
|
|
def m001_initial(db):
|
|
"""
|
|
Initial paywalls table.
|
|
"""
|
|
db.execute("""
|
|
CREATE TABLE IF NOT EXISTS paywalls (
|
|
id TEXT PRIMARY KEY,
|
|
wallet TEXT NOT NULL,
|
|
url TEXT NOT NULL,
|
|
memo TEXT NOT NULL,
|
|
amount INTEGER NOT NULL,
|
|
time TIMESTAMP NOT NULL DEFAULT (strftime('%s', 'now'))
|
|
);
|
|
""")
|
|
|
|
|
|
def migrate():
|
|
with open_ext_db("tpos") as db:
|
|
m001_initial(db)
|