Files
yourpart3/check-vocab-schema.sql
Torsten Schulz (local) 1ab9407e79
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s
Refactor code structure for improved readability and maintainability; optimize performance across multiple modules.
2026-07-21 09:08:15 +02:00

39 lines
1.1 KiB
SQL
Executable File

-- ============================================
-- Prüfe ob alle notwendigen Spalten vorhanden sind
-- ============================================
-- Führe diese Queries auf dem Server aus, um zu prüfen, ob alles vorhanden ist
-- Prüfe native_language_id in vocab_course
SELECT
column_name,
data_type,
is_nullable
FROM information_schema.columns
WHERE table_schema = 'community'
AND table_name = 'vocab_course'
AND column_name = 'native_language_id';
-- Prüfe cultural_notes in vocab_course_lesson
SELECT
column_name,
data_type,
is_nullable
FROM information_schema.columns
WHERE table_schema = 'community'
AND table_name = 'vocab_course_lesson'
AND column_name = 'cultural_notes';
-- Prüfe ob vocab_grammar_exercise Tabelle existiert
SELECT EXISTS (
SELECT FROM information_schema.tables
WHERE table_schema = 'community'
AND table_name = 'vocab_grammar_exercise'
);
-- Prüfe ob vocab_grammar_exercise_type Tabelle existiert
SELECT EXISTS (
SELECT FROM information_schema.tables
WHERE table_schema = 'community'
AND table_name = 'vocab_grammar_exercise_type'
);