lila/packages/db/drizzle/0003_greedy_revanche.sql
2026-04-07 01:03:22 +02:00

4 lines
No EOL
427 B
SQL

DROP INDEX "idx_translations_lang";--> statement-breakpoint
ALTER TABLE "translations" ADD COLUMN "difficulty" varchar(20);--> statement-breakpoint
CREATE INDEX "idx_translations_lang" ON "translations" USING btree ("language_code","difficulty","cefr_level","term_id");--> statement-breakpoint
ALTER TABLE "translations" ADD CONSTRAINT "difficulty_check" CHECK ("translations"."difficulty" IN ('easy', 'intermediate', 'hard'));