From eb8f9c1d19715a15115987c3eac901464f2aaa11 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Wed, 25 Mar 2026 16:26:48 +0100 Subject: [PATCH] Update SQL scripts to include 'created_at' timestamp for exercise types: Modify insert statements in add_vocab_lesson_didactics.sql, create-vocab-courses.sql, and update-vocab-courses-existing.sql to add a 'created_at' column with the current timestamp, enhancing data tracking for vocabulary grammar exercise types. --- backend/sql/add_vocab_lesson_didactics.sql | 12 +++++----- backend/sql/create-vocab-courses.sql | 24 +++++++++---------- backend/sql/update-vocab-courses-existing.sql | 24 +++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/backend/sql/add_vocab_lesson_didactics.sql b/backend/sql/add_vocab_lesson_didactics.sql index 058e96e..86c2c84 100644 --- a/backend/sql/add_vocab_lesson_didactics.sql +++ b/backend/sql/add_vocab_lesson_didactics.sql @@ -5,10 +5,10 @@ ADD COLUMN IF NOT EXISTS grammar_focus JSONB, ADD COLUMN IF NOT EXISTS speaking_prompts JSONB, ADD COLUMN IF NOT EXISTS practical_tasks JSONB; -INSERT INTO community.vocab_grammar_exercise_type (name, description) VALUES - ('dialog_completion', 'Dialogergänzung'), - ('situational_response', 'Situative Antwort'), - ('pattern_drill', 'Muster-Drill'), - ('reading_aloud', 'Lautlese-Übung'), - ('speaking_from_memory', 'Freies Sprechen') +INSERT INTO community.vocab_grammar_exercise_type (name, description, created_at) VALUES + ('dialog_completion', 'Dialogergänzung', NOW()), + ('situational_response', 'Situative Antwort', NOW()), + ('pattern_drill', 'Muster-Drill', NOW()), + ('reading_aloud', 'Lautlese-Übung', NOW()), + ('speaking_from_memory', 'Freies Sprechen', NOW()) ON CONFLICT (name) DO NOTHING; diff --git a/backend/sql/create-vocab-courses.sql b/backend/sql/create-vocab-courses.sql index 3cb3efc..471986c 100644 --- a/backend/sql/create-vocab-courses.sql +++ b/backend/sql/create-vocab-courses.sql @@ -218,18 +218,18 @@ CREATE INDEX IF NOT EXISTS vocab_grammar_exercise_progress_exercise_idx -- ============================================ -- Standard-Übungstypen für Grammatik -INSERT INTO community.vocab_grammar_exercise_type (name, description) VALUES - ('gap_fill', 'Lückentext-Übung'), - ('multiple_choice', 'Multiple-Choice-Fragen'), - ('sentence_building', 'Satzbau-Übung'), - ('transformation', 'Satzumformung'), - ('conjugation', 'Konjugations-Übung'), - ('declension', 'Deklinations-Übung'), - ('dialog_completion', 'Dialogergänzung'), - ('situational_response', 'Situative Antwort'), - ('pattern_drill', 'Muster-Drill'), - ('reading_aloud', 'Lautlese-Übung'), - ('speaking_from_memory', 'Freies Sprechen') +INSERT INTO community.vocab_grammar_exercise_type (name, description, created_at) VALUES + ('gap_fill', 'Lückentext-Übung', NOW()), + ('multiple_choice', 'Multiple-Choice-Fragen', NOW()), + ('sentence_building', 'Satzbau-Übung', NOW()), + ('transformation', 'Satzumformung', NOW()), + ('conjugation', 'Konjugations-Übung', NOW()), + ('declension', 'Deklinations-Übung', NOW()), + ('dialog_completion', 'Dialogergänzung', NOW()), + ('situational_response', 'Situative Antwort', NOW()), + ('pattern_drill', 'Muster-Drill', NOW()), + ('reading_aloud', 'Lautlese-Übung', NOW()), + ('speaking_from_memory', 'Freies Sprechen', NOW()) ON CONFLICT (name) DO NOTHING; -- ============================================ diff --git a/backend/sql/update-vocab-courses-existing.sql b/backend/sql/update-vocab-courses-existing.sql index e6073a8..b98e53e 100644 --- a/backend/sql/update-vocab-courses-existing.sql +++ b/backend/sql/update-vocab-courses-existing.sql @@ -110,18 +110,18 @@ CREATE INDEX IF NOT EXISTS vocab_grammar_exercise_progress_exercise_idx -- ============================================ -- 5. Standard-Daten einfügen -- ============================================ -INSERT INTO community.vocab_grammar_exercise_type (name, description) VALUES - ('gap_fill', 'Lückentext-Übung'), - ('multiple_choice', 'Multiple-Choice-Fragen'), - ('sentence_building', 'Satzbau-Übung'), - ('transformation', 'Satzumformung'), - ('conjugation', 'Konjugations-Übung'), - ('declension', 'Deklinations-Übung'), - ('dialog_completion', 'Dialogergänzung'), - ('situational_response', 'Situative Antwort'), - ('pattern_drill', 'Muster-Drill'), - ('reading_aloud', 'Lautlese-Übung'), - ('speaking_from_memory', 'Freies Sprechen') +INSERT INTO community.vocab_grammar_exercise_type (name, description, created_at) VALUES + ('gap_fill', 'Lückentext-Übung', NOW()), + ('multiple_choice', 'Multiple-Choice-Fragen', NOW()), + ('sentence_building', 'Satzbau-Übung', NOW()), + ('transformation', 'Satzumformung', NOW()), + ('conjugation', 'Konjugations-Übung', NOW()), + ('declension', 'Deklinations-Übung', NOW()), + ('dialog_completion', 'Dialogergänzung', NOW()), + ('situational_response', 'Situative Antwort', NOW()), + ('pattern_drill', 'Muster-Drill', NOW()), + ('reading_aloud', 'Lautlese-Übung', NOW()), + ('speaking_from_memory', 'Freies Sprechen', NOW()) ON CONFLICT (name) DO NOTHING; -- ============================================