lnbits-legend/lnbits/extensions/splitpayments/migrations.py
2021-06-10 12:19:50 -03:00

16 lines
378 B
Python

async def m001_initial(db):
"""
Initial split payment table.
"""
await db.execute(
"""
CREATE TABLE targets (
wallet TEXT NOT NULL,
source TEXT NOT NULL,
percent INTEGER NOT NULL CHECK (percent >= 0 AND percent <= 100),
alias TEXT,
UNIQUE (source, wallet)
);
"""
)