-
Notifications
You must be signed in to change notification settings - Fork 0
/
migrations.py
42 lines (38 loc) · 951 Bytes
/
migrations.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
async def m001_initial(db):
"""
Initial templates table.
"""
await db.execute(
"""
CREATE TABLE eightball.maintable (
id TEXT PRIMARY KEY,
wallet TEXT NOT NULL,
name TEXT NOT NULL,
wordlist TEXT NOT NULL,
lnurlpayamount INTEGER DEFAULT 0,
lnurlpay TEXT
);
"""
)
async def m002_drop_lnurlpay(db):
"""
Migration to drop lnurlpay column from eightball.maintable.
"""
# Drop lnurlpay from raisenow.raises
await db.execute(
"""
ALTER TABLE eightball.maintable
DROP COLUMN lnurlpay;
"""
)
async def m003_add_description(db):
"""
Migration to add description column from eightball.maintable.
"""
# Drop lnurlpay from raisenow.raises
await db.execute(
"""
ALTER TABLE eightball.maintable
ADD COLUMN description TEXT;
"""
)