aboutsummaryrefslogtreecommitdiff
path: root/zig-comments/src/migrations
diff options
context:
space:
mode:
authorMartin Ashby <martin@ashbysoft.com>2023-08-14 23:14:18 +0100
committerMartin Ashby <martin@ashbysoft.com>2023-08-22 10:10:02 +0100
commit2b66832cae2ec88c730c63e7f3eff84d00c95330 (patch)
tree344188640643fe46808301da887fd86c12e0003d /zig-comments/src/migrations
parent89aae265bc3cfd03f4081ef1a8f034e538fef702 (diff)
downloadmfashby.net-2b66832cae2ec88c730c63e7f3eff84d00c95330.tar.gz
mfashby.net-2b66832cae2ec88c730c63e7f3eff84d00c95330.tar.bz2
mfashby.net-2b66832cae2ec88c730c63e7f3eff84d00c95330.tar.xz
mfashby.net-2b66832cae2ec88c730c63e7f3eff84d00c95330.zip
Fix many duplicate capchas
Diffstat (limited to 'zig-comments/src/migrations')
-rw-r--r--zig-comments/src/migrations/1_capcha.sql8
1 files changed, 4 insertions, 4 deletions
diff --git a/zig-comments/src/migrations/1_capcha.sql b/zig-comments/src/migrations/1_capcha.sql
index c80a4bd..bf43331 100644
--- a/zig-comments/src/migrations/1_capcha.sql
+++ b/zig-comments/src/migrations/1_capcha.sql
@@ -1,6 +1,6 @@
create table if not exists capchas(question text not null, answer text not null, id uuid not null default gen_random_uuid());
create unique index if not exists idx_capchas_id on capchas(id);
-insert into capchas(question, answer) values ('What is 1 + 3?', '4');
-insert into capchas(question, answer) values ('If I have 3 apples and 4 pears, how many fruit do I have?', '7');
-insert into capchas(question, answer) values ('What is 3 squared?', '9');
-insert into capchas(question, answer) values ('What is the meaning of life, the universe, and everything?', '42');
+insert into capchas(question, answer, id) values ('What is 1 + 3?', '4', 'de850c99-906b-4ff8-b8e7-fce3bccd89bc') on conflict do nothing;
+insert into capchas(question, answer, id) values ('If I have 3 apples and 4 pears, how many fruit do I have?', '7', 'c83e23a8-ec53-48d4-a468-a530dfa634b7') on conflict do nothing;
+insert into capchas(question, answer, id) values ('What is 3 squared?', '9', '798bf299-4e3b-4f98-acac-f0c41201b613') on conflict do nothing;
+insert into capchas(question, answer, id) values ('What is the meaning of life, the universe, and everything?', '42', '7025fcbf-ebe8-4679-809f-08d632591b03') on conflict do nothing;