feat: add danish support to dashboard (#580)

* feat: Add Danish Support

* feat: add migration file

* chore: update migrations

---------

Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
Adeyemi Adetunji
2025-10-13 18:07:46 +01:00
committed by GitHub
co-authored by Rotimi Best
parent c31e5e131f
commit 3692046077
7 changed files with 1613 additions and 4 deletions
@@ -0,0 +1,27 @@
drop view if exists "public"."lesson_versions";
alter table "public"."lesson_language" alter column "locale" drop default;
alter table "public"."profile" alter column "locale" drop default;
alter type "public"."LOCALE" rename to "LOCALE__old_version_to_be_dropped";
create type "public"."LOCALE" as enum ('en', 'hi', 'fr', 'pt', 'de', 'vi', 'ru', 'es', 'pl', 'da');
alter table "public"."lesson_language" alter column locale type "public"."LOCALE" using locale::text::"public"."LOCALE";
alter table "public"."profile" alter column locale type "public"."LOCALE" using locale::text::"public"."LOCALE";
alter table "public"."lesson_language" alter column "locale" set default 'en'::"LOCALE";
alter table "public"."profile" alter column "locale" set default 'en'::"LOCALE";
drop type "public"."LOCALE__old_version_to_be_dropped";
create or replace view "public"."lesson_versions" as SELECT llh.old_content,
llh.new_content,
llh."timestamp",
ll.locale,
ll.lesson_id
FROM (lesson_language_history llh
JOIN lesson_language ll ON ((ll.id = llh.lesson_language_id)));