Overview
Comment: | Fix migration: \n does not exist in SQLite |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA3-256: |
0fc73faa329e7bb41bfd3d0c5f55a698 |
User & Date: | bohwaz on 2021-03-01 01:56:52 |
Other Links: | branch diff | manifest | tags |
Context
2021-03-01
| ||
01:57 | Fix function name typo in encrypted page check-in: 8a7cea7e6a user: bohwaz tags: dev | |
01:56 | Fix migration: \n does not exist in SQLite check-in: 0fc73faa32 user: bohwaz tags: dev | |
01:56 | Do not load file objects at first, only load when requested check-in: c4b4bc1cc5 user: bohwaz tags: dev | |
Changes
Modified src/include/data/1.1.0_migration.sql from [bd46f0853f] to [1e80e5f88d].
︙ | ︙ | |||
126 127 128 129 130 131 132 133 134 | 'text/plain', modified, 0 -- size will be set after FROM wiki_as_files; UPDATE wiki_as_files SET new_id = (SELECT id FROM files WHERE path = 'web/' || (CASE WHEN path IS NOT NULL THEN path || '/' ELSE '' END) || uri); INSERT INTO files_contents (id, compressed, content) SELECT new_id, 0, | > > > | > | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | 'text/plain', modified, 0 -- size will be set after FROM wiki_as_files; UPDATE wiki_as_files SET new_id = (SELECT id FROM files WHERE path = 'web/' || (CASE WHEN path IS NOT NULL THEN path || '/' ELSE '' END) || uri); -- x'0a' == \n INSERT INTO files_contents (id, compressed, content) SELECT new_id, 0, 'Title: ' || title || x'0a' || 'Published: ' || created || x'0a' || 'Status: ' || (CASE WHEN public THEN 'Online' ELSE 'Draft' END) || x'0a' || 'Format: ' || (CASE WHEN encrypted THEN 'Skriv/Encrypted' ELSE 'Skriv' END) || x'0a' || x'0a' || '----' || x'0a' || x'0a' || content FROM wiki_as_files; -- Set file size UPDATE files SET size = (SELECT LENGTH(content) FROM files_contents WHERE id = files.id); UPDATE wiki_as_files SET new_parent = (SELECT w.new_id FROM wiki_as_files w WHERE w.old_id = wiki_as_files.old_parent); -- Copy to search |
︙ | ︙ |