aboutsummaryrefslogtreecommitdiff
path: root/initialize.sql
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-12-12 07:54:44 +0100
committerPřemysl Eric Janouch <p@janouch.name>2023-12-12 08:49:32 +0100
commit286b43d1733e00c49e6246669896cde0340f990b (patch)
tree9aa19e6089105b67dde8ae6c9db4ae1fc4dd8383 /initialize.sql
parent80c5f1cd32c06977da69c8a815ffa35ce9a909f1 (diff)
downloadgallery-286b43d1733e00c49e6246669896cde0340f990b.tar.gz
gallery-286b43d1733e00c49e6246669896cde0340f990b.tar.xz
gallery-286b43d1733e00c49e6246669896cde0340f990b.zip
More database thinking
Diffstat (limited to 'initialize.sql')
-rw-r--r--initialize.sql5
1 files changed, 2 insertions, 3 deletions
diff --git a/initialize.sql b/initialize.sql
index 4e2c56e..31f4b13 100644
--- a/initialize.sql
+++ b/initialize.sql
@@ -65,9 +65,8 @@ CREATE TABLE IF NOT EXISTS tag_space(
CREATE UNIQUE INDEX IF NOT EXISTS tag_space__name ON tag_space(name);
-- To avoid having to deal with NULLs, always create this special tag space.
-INSERT INTO tag_space(id, name, description)
-VALUES(0, '', 'User-defined tags')
-ON CONFLICT DO NOTHING;
+INSERT OR IGNORE INTO tag_space(id, name, description)
+VALUES(0, '', 'User-defined tags');
CREATE TABLE IF NOT EXISTS tag(
id INTEGER NOT NULL,