MathTutor / database /03_seed.sql
rsreenivasa's picture
AI MVP
e46d575
Raw History Blame Contribute Delete
2.77 kB
-- ============================================================
-- MathMind AI β€” Seed Data
-- Run AFTER 02_rls.sql
-- ============================================================
-- ── Badge definitions ──────────────────────────────────────
-- condition_key must match keys in backend/routers/badges.py BADGE_CONDITIONS
insert into public.badges (name, emoji, condition_key, description) values
(
'First Try Champion',
'πŸ†',
'first_pass',
'Passed your first mini-test β€” you''re officially a MathMind champion!'
),
(
'Getting Started',
'πŸš€',
'five_sessions',
'Completed 5 learning sessions β€” the journey has begun!'
),
(
'Math Explorer',
'🌟',
'ten_sessions',
'Completed 10 sessions β€” you are truly exploring mathematics!'
),
(
'On Fire',
'πŸ”₯',
'streak_5',
'Maintained a 5-day learning streak β€” you''re on fire!'
),
(
'Perfect Score',
'πŸ’―',
'perfect_score',
'Scored 100% on a mini-test β€” flawless!'
)
on conflict (name) do nothing;
-- ── Sample math topics (for reference / future topic picker UI) ─────────────
-- This is a reference table only β€” not used by the app logic directly.
-- Uncomment and extend if you add a topic browser feature.
/*
create table if not exists public.sample_topics (
id uuid primary key default gen_random_uuid(),
grade smallint not null,
topic text not null
);
insert into public.sample_topics (grade, topic) values
-- Grade 6
(6, 'Fractions and mixed numbers'),
(6, 'Ratios and proportions'),
(6, 'Area and perimeter'),
(6, 'Introduction to negative numbers'),
-- Grade 7
(7, 'Linear equations'),
(7, 'Percentages and discounts'),
(7, 'Angles and triangles'),
(7, 'Introduction to probability'),
-- Grade 8
(8, 'Systems of linear equations'),
(8, 'Pythagorean theorem'),
(8, 'Functions and graphs'),
(8, 'Scientific notation'),
-- Grade 9
(9, 'Quadratic equations'),
(9, 'Factoring polynomials'),
(9, 'Introduction to trigonometry'),
(9, 'Inequalities'),
-- Grade 10
(10, 'Trigonometric ratios'),
(10, 'Circle theorems'),
(10, 'Sequences and series'),
(10, 'Probability and statistics'),
-- Grade 11
(11, 'Logarithms and exponentials'),
(11, 'Binomial theorem'),
(11, 'Vectors'),
(11, 'Differentiation introduction'),
-- Grade 12
(12, 'Integration'),
(12, 'Complex numbers'),
(12, 'Matrices'),
(12, 'Permutations and combinations');
*/