@tiddlywiki/mws 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tiddlywiki/mws",
3
3
  "description": "TiddlyWiki Multiple Wiki Server",
4
4
  "private": false,
5
- "version": "0.2.3",
5
+ "version": "0.2.4",
6
6
  "bin": {
7
7
  "mws": "./mws.run.mjs"
8
8
  },
@@ -0,0 +1,25 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - The primary key for the `recipe_bag` table will be changed. If it partially fails, the table could be left without primary key constraint.
5
+
6
+ */
7
+ -- RedefineTables
8
+ PRAGMA defer_foreign_keys=ON;
9
+ PRAGMA foreign_keys=OFF;
10
+ CREATE TABLE "new_recipe_bag" (
11
+ "recipe_id" TEXT NOT NULL,
12
+ "bag_id" TEXT NOT NULL,
13
+ "priority" INTEGER NOT NULL,
14
+ "is_writable" BOOLEAN NOT NULL,
15
+ "prefix" TEXT NOT NULL,
16
+
17
+ PRIMARY KEY ("recipe_id", "bag_id", "is_writable", "prefix"),
18
+ CONSTRAINT "recipe_bag_recipe_id_fkey" FOREIGN KEY ("recipe_id") REFERENCES "recipe" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
19
+ CONSTRAINT "recipe_bag_bag_id_fkey" FOREIGN KEY ("bag_id") REFERENCES "bag" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
20
+ );
21
+ INSERT INTO "new_recipe_bag" ("bag_id", "is_writable", "prefix", "priority", "recipe_id") SELECT "bag_id", "is_writable", "prefix", "priority", "recipe_id" FROM "recipe_bag";
22
+ DROP TABLE "recipe_bag";
23
+ ALTER TABLE "new_recipe_bag" RENAME TO "recipe_bag";
24
+ PRAGMA foreign_keys=ON;
25
+ PRAGMA defer_foreign_keys=OFF;