0003_outstanding_centennial.sql 757 B

1234567891011121314
  1. CREATE TABLE "sensitive_words" (
  2. "id" serial PRIMARY KEY NOT NULL,
  3. "word" varchar(255) NOT NULL,
  4. "match_type" varchar(20) DEFAULT 'contains' NOT NULL,
  5. "description" text,
  6. "is_enabled" boolean DEFAULT true NOT NULL,
  7. "created_at" timestamp with time zone DEFAULT now(),
  8. "updated_at" timestamp with time zone DEFAULT now()
  9. );
  10. --> statement-breakpoint
  11. ALTER TABLE "message_request" ADD COLUMN "blocked_by" varchar(50);--> statement-breakpoint
  12. ALTER TABLE "message_request" ADD COLUMN "blocked_reason" text;--> statement-breakpoint
  13. CREATE INDEX "idx_sensitive_words_enabled" ON "sensitive_words" USING btree ("is_enabled","match_type");--> statement-breakpoint
  14. CREATE INDEX "idx_sensitive_words_created_at" ON "sensitive_words" USING btree ("created_at");