fix(db): store addons.enabled as the integer flag on Postgres too

addons.enabled was the one flag MikroORM's boolean type declared as a
Postgres boolean, while SQLite and every other flag hold 0/1, so an addon
migration's usual SET enabled = 1 would fail there and a Kysely read would
answer true instead of 1. The column now uses IntegerFlagType: the entity
still reads a boolean, both engines store 0/1, and the regenerated Postgres
baseline declares it bigint default 0. The entity generator renders the
type for the columns in BOOLEAN_COLUMNS.
This commit is contained in:
Maurice
2026-11-17 12:04:10 +01:00
parent 633e9bcdc1
commit 54b843ae29
7 changed files with 152 additions and 26 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
-- The schema a fresh Postgres database starts from. Generated by `npm run gen:pg-baseline`; do not edit.
CREATE COLLATION IF NOT EXISTS nocase (provider = icu, locale = 'und-u-ks-level2', deterministic = false);
create table "addons" ("id" text null, "name" text not null, "description" text null, "type" text not null default 'global', "icon" text null default 'Puzzle', "enabled" boolean null default false, "config" jsonb null default '{}', "sort_order" bigint null default 0, primary key ("id"));
create table "addons" ("id" text null, "name" text not null, "description" text null, "type" text not null default 'global', "icon" text null default 'Puzzle', "enabled" bigint null default 0, "config" jsonb null default '{}', "sort_order" bigint null default 0, primary key ("id"));
create table "app_settings" ("key" text null, "value" text null, primary key ("key"));
create table "document_providers" ("id" text null, "name" text not null, "description" text null, "icon" text null default 'FileText', "enabled" bigint null default 0, "sort_order" bigint null default 0, primary key ("id"));
create table "document_provider_fields" ("id" bigserial primary key, "provider_id" text not null, "field_key" text not null, "label" text not null, "input_type" text not null default 'text', "placeholder" text null, "hint" text null, "required" bigint null default 0, "secret" bigint null default 0, "sort_order" bigint null default 0);