CREATE TABLE "app_configs" (
	"key" varchar PRIMARY KEY NOT NULL,
	"value" varchar NOT NULL,
	"value_type" varchar NOT NULL,
	"updated_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE "user_configs" (
	"user_id" integer NOT NULL,
	"key" varchar NOT NULL,
	"value" varchar NOT NULL,
	"value_type" varchar NOT NULL,
	"updated_at" timestamp DEFAULT now() NOT NULL,
	CONSTRAINT "user_configs_user_id_key_pk" PRIMARY KEY("user_id","key")
);
--> statement-breakpoint
ALTER TABLE "user_configs" ADD CONSTRAINT "user_configs_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
CREATE INDEX "user_configs_user_id_idx" ON "user_configs" USING btree ("user_id");