Skip to content

Commit 29a35d9

Browse files
authored
fix: simplify migration (#16)
* fix: simplify migration * chore: code format
1 parent d328213 commit 29a35d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

migrations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async def m003_tipjar_id_string_rename_tables(db: Database):
5858
FROM tipjar.TipJars;
5959
"""
6060
)
61-
await db.execute("DROP TABLE tipjar.TipJars;")
61+
6262
await db.execute(
6363
f"""
6464
CREATE TABLE IF NOT EXISTS tipjar.tip (
@@ -67,8 +67,7 @@ async def m003_tipjar_id_string_rename_tables(db: Database):
6767
wallet TEXT NOT NULL,
6868
name TEXT NOT NULL,
6969
message TEXT NOT NULL,
70-
sats {db.big_int} NOT NULL,
71-
FOREIGN KEY(tipjar) REFERENCES {db.references_schema}tipjar(id)
70+
sats {db.big_int} NOT NULL
7271
);
7372
"""
7473
)
@@ -80,3 +79,4 @@ async def m003_tipjar_id_string_rename_tables(db: Database):
8079
"""
8180
)
8281
await db.execute("DROP TABLE tipjar.Tips;")
82+
await db.execute("DROP TABLE tipjar.TipJars;")

0 commit comments

Comments
 (0)