Skip to content
Snippets Groups Projects
Commit b7e4a2a7 authored by Tulir Asokan's avatar Tulir Asokan
Browse files

Add IF NOT EXISTS for entry table creation

parent 7b609ebb
Branches
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ async def upgrade_latest(conn: Connection, scheme: Scheme) -> None:
)"""
)
await conn.execute(
"""CREATE TABLE entry (
"""CREATE TABLE IF NOT EXISTS entry (
feed_id INTEGER,
id TEXT,
date timestamp NOT NULL,
......@@ -59,7 +59,7 @@ async def upgrade_latest(conn: Connection, scheme: Scheme) -> None:
link TEXT NOT NULL,
PRIMARY KEY (feed_id, id),
FOREIGN KEY (feed_id) REFERENCES feed (id)
);"""
)"""
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment