CREATE TABLE "hosted_room" ( "n" serial PRIMARY KEY NOT NULL, "owner_id" text NOT NULL, "owner_imvu_id" bigint NOT NULL, "name" text NOT NULL, "description" text DEFAULT '' NOT NULL, "room_pid" bigint NOT NULL, "rating" text DEFAULT 'general' NOT NULL, "max_users" integer DEFAULT 10 NOT NULL, "scene" jsonb DEFAULT '[]'::jsonb NOT NULL, "scene_hash" text DEFAULT '' NOT NULL, "closed" boolean DEFAULT false NOT NULL, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL ); --> statement-breakpoint ALTER TABLE "hosted_room" ADD CONSTRAINT "hosted_room_owner_id_user_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint CREATE INDEX "hosted_room_owner" ON "hosted_room" USING btree ("owner_id");--> statement-breakpoint CREATE INDEX "hosted_room_created" ON "hosted_room" USING btree ("created_at");