DROP TABLE IF EXISTS "public"."check_items_group"; CREATE TABLE "public"."check_items_group" ( "id" serial, "name" varchar(255) NOT NULL, PRIMARY KEY ("id") ); DROP TABLE IF EXISTS "public"."check_items"; CREATE TABLE "public"."check_items" ( "id" serial, "name" varchar(255) NOT NULL, "group_id" int, PRIMARY KEY ("id"), FOREIGN KEY (group_id) REFERENCES check_items_group(id) );