From b324803fe11b52b28ac2dc459504f904a48a79d4 Mon Sep 17 00:00:00 2001
From: Joris
Date: Fri, 7 Feb 2025 11:45:22 +0100
Subject: Use strict tables

---
 src/db/sql/2-primary-key-question-responses.sql | 20 --------------------
 1 file changed, 20 deletions(-)
 delete mode 100644 src/db/sql/2-primary-key-question-responses.sql

(limited to 'src/db/sql/2-primary-key-question-responses.sql')

diff --git a/src/db/sql/2-primary-key-question-responses.sql b/src/db/sql/2-primary-key-question-responses.sql
deleted file mode 100644
index cb7df21..0000000
--- a/src/db/sql/2-primary-key-question-responses.sql
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Allows to use ON CONFLICT on (question, responses) when inserting a card. */
-
-CREATE TABLE IF NOT EXISTS cards_copy (
-  question VARCHAR NOT NULL,
-  responses VARCHAR NOT NULL,
-  state VARCHAR NOT NULL,
-  created TIMESTAMP NOT NULL,
-  updated TIMESTAMP NULL,
-  deleted TIMESTAMP NULL,
-  deck_read TIMESTAMP NOT NULL,
-  ready TIMESTAMP NOT NULL,
-  PRIMARY KEY (question, responses)
-);
-
-INSERT INTO cards_copy (question, responses, state, created, updated, deleted, deck_read, ready)
-   SELECT question, responses, state, created, updated, deleted, deck_read, ready FROM cards;
-
-DROP TABLE cards;
-
-ALTER TABLE cards_copy RENAME TO cards;
-- 
cgit v1.2.3

