fix compatibility on REFERENCES statement on streamalerts table creation.

This commit is contained in:
fiatjaf 2021-08-11 10:23:02 -03:00
parent 18761ea1da
commit 6312b5b564

View file

@ -18,7 +18,7 @@ async def m001_initial(db):
)
await db.execute(
"""
f"""
CREATE TABLE IF NOT EXISTS streamalerts.Donations (
id TEXT PRIMARY KEY,
wallet TEXT NOT NULL,
@ -29,7 +29,7 @@ async def m001_initial(db):
amount FLOAT NOT NULL,
service INTEGER NOT NULL,
posted BOOLEAN NOT NULL,
FOREIGN KEY(service) REFERENCES Services(id)
FOREIGN KEY(service) REFERENCES {db.references_schema}Services(id)
);
"""
)