push to maple-street
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE "announcements" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"title" text NOT NULL,
|
||||
"body" text DEFAULT '' NOT NULL,
|
||||
"published" boolean DEFAULT false NOT NULL,
|
||||
"created_by" text,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"updated_at" timestamp with time zone
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "announcements" ADD CONSTRAINT "announcements_created_by_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
||||
CREATE INDEX "announcements_published_created_idx" ON "announcements" USING btree ("published","created_at");
|
||||
Reference in New Issue
Block a user