@apprun/shiqu 0.5.0 → 0.6.5
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/README.md +23 -1
- package/dist/client/assets/{es-CzuDB78F.js → es-B0vSJwvP.js} +1 -1
- package/dist/client/assets/index-B0URXv2Q.css +1 -0
- package/dist/client/assets/index-y4BxCnhg.js +17 -0
- package/dist/client/assets/reader-pdf-AMLMoode.js +4 -0
- package/dist/client/assets/reader-png-UKUNKgFB.js +1 -0
- package/dist/client/assets/reader-zip-CYrTAeJC.js +16 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +3262 -1264
- package/drizzle/0009_story_summary.sql +22 -0
- package/drizzle/0010_book_image_references.sql +14 -0
- package/drizzle/0011_publication_defaults.sql +5 -0
- package/package.json +1 -1
- package/dist/client/assets/index-BPa--qC6.js +0 -10
- package/dist/client/assets/index-Bg7bpj-l.css +0 -1
- package/dist/client/assets/reader-pdf-BAHQhgz5.js +0 -4
- package/dist/client/assets/reader-png-hv2goeMA.js +0 -1
- package/dist/client/assets/reader-zip-4TLnMPSg.js +0 -5
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
-- Use one story-summary field; historical text moves without pretending it has been reverified.
|
|
2
|
+
ALTER TABLE stories RENAME COLUMN hook TO summary;
|
|
3
|
+
|
|
4
|
+
UPDATE reader_sessions
|
|
5
|
+
SET document=json_remove(json_set(document,'$.plan.summary',
|
|
6
|
+
CASE WHEN json_type(document,'$.plan.summary')='text' AND length(trim(json_extract(document,'$.plan.summary')))>0 THEN json_extract(document,'$.plan.summary') ELSE json_extract(document,'$.plan.hook') END),'$.plan.hook')
|
|
7
|
+
WHERE CASE WHEN json_valid(document) THEN json_type(document,'$.plan.hook') IS NOT NULL ELSE 0 END;
|
|
8
|
+
|
|
9
|
+
UPDATE reader_sessions
|
|
10
|
+
SET document=json_remove(json_set(document,'$.draft.summary',
|
|
11
|
+
CASE WHEN json_type(document,'$.draft.summary')='text' AND length(trim(json_extract(document,'$.draft.summary')))>0 THEN json_extract(document,'$.draft.summary') ELSE json_extract(document,'$.draft.hook') END),'$.draft.hook')
|
|
12
|
+
WHERE CASE WHEN json_valid(document) THEN json_type(document,'$.draft.hook') IS NOT NULL ELSE 0 END;
|
|
13
|
+
|
|
14
|
+
UPDATE reader_sessions
|
|
15
|
+
SET document=json_remove(json_set(document,'$.storyboard.outline.summary',
|
|
16
|
+
CASE WHEN json_type(document,'$.storyboard.outline.summary')='text' AND length(trim(json_extract(document,'$.storyboard.outline.summary')))>0 THEN json_extract(document,'$.storyboard.outline.summary') ELSE json_extract(document,'$.storyboard.outline.hook') END),'$.storyboard.outline.hook')
|
|
17
|
+
WHERE CASE WHEN json_valid(document) THEN json_type(document,'$.storyboard.outline.hook') IS NOT NULL ELSE 0 END;
|
|
18
|
+
|
|
19
|
+
UPDATE reader_sessions
|
|
20
|
+
SET document=json_remove(json_set(document,'$.revision.base.plan.summary',
|
|
21
|
+
CASE WHEN json_type(document,'$.revision.base.plan.summary')='text' AND length(trim(json_extract(document,'$.revision.base.plan.summary')))>0 THEN json_extract(document,'$.revision.base.plan.summary') ELSE json_extract(document,'$.revision.base.plan.hook') END),'$.revision.base.plan.hook')
|
|
22
|
+
WHERE CASE WHEN json_valid(document) THEN json_type(document,'$.revision.base.plan.hook') IS NOT NULL ELSE 0 END;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
CREATE TABLE book_image_references (
|
|
2
|
+
owner_id TEXT NOT NULL,
|
|
3
|
+
book_key TEXT NOT NULL,
|
|
4
|
+
story_id TEXT NOT NULL,
|
|
5
|
+
page INTEGER NOT NULL,
|
|
6
|
+
token TEXT NOT NULL,
|
|
7
|
+
asset_key TEXT NOT NULL,
|
|
8
|
+
updated_at TEXT NOT NULL,
|
|
9
|
+
PRIMARY KEY(owner_id,book_key)
|
|
10
|
+
);
|
|
11
|
+
CREATE TRIGGER book_image_reference_on_delete AFTER INSERT ON library_deletions
|
|
12
|
+
BEGIN
|
|
13
|
+
DELETE FROM book_image_references WHERE owner_id=NEW.user_id AND story_id=NEW.story_id;
|
|
14
|
+
END;
|