CREATE TABLE "tags" (
	"id" text PRIMARY KEY NOT NULL,
	"entity_type" text NOT NULL,
	"entity_id" text NOT NULL,
	"name" text NOT NULL,
	"created_at" timestamp with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX "tags_entity_name_unique" ON "tags" USING btree ("entity_type","entity_id","name");
--> statement-breakpoint
CREATE INDEX "tags_entity_idx" ON "tags" USING btree ("entity_type","entity_id");
