CREATE TABLE "boards" (
	"id" bigserial PRIMARY KEY NOT NULL,
	"did" text NOT NULL,
	"rkey" text NOT NULL,
	"cid" text NOT NULL,
	"name" text NOT NULL,
	"description" text,
	"slug" text,
	"sort_order" integer,
	"category_id" bigint,
	"category_uri" text NOT NULL,
	"created_at" timestamp with time zone NOT NULL,
	"indexed_at" timestamp with time zone NOT NULL
);
--> statement-breakpoint
ALTER TABLE "boards" ADD CONSTRAINT "boards_category_id_categories_id_fk" FOREIGN KEY ("category_id") REFERENCES "public"."categories"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
CREATE UNIQUE INDEX "boards_did_rkey_idx" ON "boards" USING btree ("did","rkey");--> statement-breakpoint
CREATE INDEX "boards_category_id_idx" ON "boards" USING btree ("category_id");