Files
5965fada38 Make descriptions multilingual (#89)
* Make descriptions multilingual

* Format and test fixes

* Update src/lib/server/db/tenant-schema.ts

* Fix tenant-switcher to update instantly

* Fix sql migrations for description

* Add languages to tenant table

* Fix tenant schema

* Use objects for translated fields

* Fix format

* Fix lint

* Allow longer descriptions for channels

* Field Localizations are based on tenant locales not supportedLocales

* Fix agent image list preview

* Improve language tab keyboard navigation

* Fix falsy redirect after store init

---------

Co-authored-by: Karl Ludwig Weise <office@ludwigweise.de>
Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-10-01 18:43:01 +02:00

10 lines
370 B
SQL

ALTER TABLE "tenant"
ALTER COLUMN "description"
SET DATA TYPE json
USING CASE
WHEN description IS NULL THEN NULL
WHEN description::text = '' THEN NULL
ELSE description::json
END;--> statement-breakpoint
ALTER TABLE "tenant" RENAME COLUMN "description" TO "descriptions";--> statement-breakpoint
ALTER TABLE "tenant" ADD COLUMN "languages" json NOT NULL;