Skip to content

Commit

Permalink
Merge pull request #153 from shuymn/fix/delete-pragma-foreign-keys
Browse files Browse the repository at this point in the history
Remove unsupported `PRAGMA foreign_keys`
  • Loading branch information
shuymn authored Aug 5, 2023
2 parents 0cd1a11 + 771dedf commit 4134760
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions migrations/0000_initial.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
-- Migration number: 0000 2022-12-05T20:27:34.391Z

PRAGMA foreign_keys = ON;

CREATE TABLE "actors" (
"id" TEXT PRIMARY KEY,
"type" TEXT NOT NULL,
Expand Down
2 changes: 0 additions & 2 deletions migrations/0016_change_outbox_objects.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ CREATE TABLE "new_outbox_objects" (
INSERT INTO new_outbox_objects (id, actor_id, object_id, cdate, published_date, `to`)
SELECT id, actor_id, object_id, cdate, published_date, json_array(target) FROM outbox_objects;

PRAGMA foreign_keys = false;
DROP TABLE outbox_objects;
ALTER TABLE new_outbox_objects RENAME TO outbox_objects;
PRAGMA foreign_keys = true;

CREATE INDEX "outbox_objects_actor_id" ON "outbox_objects" ("actor_id");
CREATE INDEX "outbox_objects_to" ON "outbox_objects" ("to");
Expand Down
4 changes: 0 additions & 4 deletions migrations/0017_change_actor_reblogs.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PRAGMA foreign_keys = false;

CREATE TABLE "new_actor_reblogs" (
"id" TEXT NOT NULL PRIMARY KEY,
"mastodon_id" TEXT UNIQUE NOT NULL,
Expand Down Expand Up @@ -42,5 +40,3 @@ WHERE tmp.rn = 1;

DROP TABLE actor_reblogs;
ALTER TABLE new_actor_reblogs RENAME TO actor_reblogs;

PRAGMA foreign_keys = true;

0 comments on commit 4134760

Please sign in to comment.