CREATE TABLE IF NOT EXISTS "assessment_templates" ("id" varchar PRIMARY KEY NOT NULL, "tenant_id" varchar, "name" varchar NOT NULL, "description" text, "keywords" text, "question_count" integer NOT NULL DEFAULT (5), "difficulty_distribution" text, "style" varchar NOT NULL DEFAULT ('technical'), "knowledge_base_id" varchar, "knowledge_group_id" varchar, "is_active" boolean NOT NULL DEFAULT (1), "version" integer NOT NULL DEFAULT (1), "created_by" varchar, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "updated_at" datetime NOT NULL DEFAULT (datetime('now')), CONSTRAINT "FK_cc65bf036f86297666e8c6d81da" FOREIGN KEY ("tenant_id") REFERENCES "tenants" ("id") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT "FK_82bfee03c2fcb339451261853a3" FOREIGN KEY ("knowledge_base_id") REFERENCES "knowledge_bases" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT "FK_7ef697ba4f123c7aa55aad478f2" FOREIGN KEY ("knowledge_group_id") REFERENCES "knowledge_groups" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION);
