Dashboard
GED RLA Admin β Content Overview
β
Passages
β
Questions
β
Multiple Choice
β
Drag & Other
Quick Add
Recent Questions
| # | Question | Type | Passage | |
|---|---|---|---|---|
| Loading⦠| ||||
| # | Question | Type | Passage | |
|---|---|---|---|---|
| Loading⦠| ||||
| # | Title | Section | Author | Image | Tabs | Questions | Actions |
|---|---|---|---|---|---|---|---|
| Loading⦠| |||||||
| # | Question | Type | Passage | Answer | Actions |
|---|---|---|---|---|---|
| Loading⦠| |||||
-- ββββ Create Tables ββββ CREATE TABLE IF NOT EXISTS passages ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, title TEXT NOT NULL, section_label TEXT, author TEXT, content TEXT NOT NULL DEFAULT '', image_data TEXT, tab_labels JSONB, tab_contents JSONB, created_at TIMESTAMPTZ DEFAULT NOW() ); CREATE TABLE IF NOT EXISTS questions ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, passage_id UUID REFERENCES passages(id) ON DELETE SET NULL, type TEXT NOT NULL, question TEXT NOT NULL, options JSONB, answer INTEGER, drag_items JSONB, correct_items JSONB, slots INTEGER, web_center TEXT, sentence TEXT, blank_answers JSONB, dropdown_config JSONB, phrase_text TEXT, correct_phrase TEXT, phrase_subtype TEXT, explanation TEXT, order_index INTEGER DEFAULT 0, created_at TIMESTAMPTZ DEFAULT NOW() ); -- ββββ Row Level Security ββββ ALTER TABLE passages ENABLE ROW LEVEL SECURITY; ALTER TABLE questions ENABLE ROW LEVEL SECURITY; CREATE POLICY IF NOT EXISTS "public_read_passages" ON passages FOR SELECT USING (true); CREATE POLICY IF NOT EXISTS "public_read_questions" ON questions FOR SELECT USING (true); CREATE POLICY IF NOT EXISTS "admin_all_passages" ON passages FOR ALL USING (true); CREATE POLICY IF NOT EXISTS "admin_all_questions" ON questions FOR ALL USING (true); -- ββββ Add new columns if upgrading existing tables ββββ ALTER TABLE passages ADD COLUMN IF NOT EXISTS image_data TEXT; ALTER TABLE passages ADD COLUMN IF NOT EXISTS tab_labels JSONB; ALTER TABLE passages ADD COLUMN IF NOT EXISTS tab_contents JSONB; ALTER TABLE questions ADD COLUMN IF NOT EXISTS web_center TEXT; ALTER TABLE questions ADD COLUMN IF NOT EXISTS dropdown_config JSONB;
{{blank}} at each blank position