feat: select columns to show

This commit is contained in:
Vasily Zubarev
2025-03-23 12:49:09 +01:00
parent 21b46e2d9c
commit 4adf4de4bc
9 changed files with 306 additions and 128 deletions

View File

@@ -0,0 +1,19 @@
-- RedefineTables
PRAGMA defer_foreign_keys=ON;
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_fields" (
"code" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"type" TEXT NOT NULL DEFAULT 'string',
"llm_prompt" TEXT,
"options" JSONB,
"is_visible_in_list" BOOLEAN NOT NULL DEFAULT false,
"is_visible_in_analysis" BOOLEAN NOT NULL DEFAULT false,
"is_required" BOOLEAN NOT NULL DEFAULT false,
"is_extra" BOOLEAN NOT NULL DEFAULT true
);
INSERT INTO "new_fields" ("code", "is_extra", "is_required", "llm_prompt", "name", "options", "type") SELECT "code", "is_extra", "is_required", "llm_prompt", "name", "options", "type" FROM "fields";
DROP TABLE "fields";
ALTER TABLE "new_fields" RENAME TO "fields";
PRAGMA foreign_keys=ON;
PRAGMA defer_foreign_keys=OFF;