mirror of
https://github.com/maubot/rss.git
synced 2024-10-01 08:25:36 -04:00
Add IF NOT EXISTS for entry table creation
This commit is contained in:
parent
7b609ebb24
commit
b7e4a2a7bd
@ -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)
|
||||
);"""
|
||||
)"""
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user