CREATE TABLE "user_settings" (
	"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
	"user_id" uuid NOT NULL,
	"email_notifications" integer DEFAULT 1 NOT NULL,
	"new_campaigns_notifications" integer DEFAULT 1 NOT NULL,
	"submission_status_notifications" integer DEFAULT 1 NOT NULL,
	"payment_notifications" integer DEFAULT 1 NOT NULL,
	"marketing_emails" integer DEFAULT 0 NOT NULL,
	"profile_visible" integer DEFAULT 1 NOT NULL,
	"stats_visible" integer DEFAULT 0 NOT NULL,
	"created_at" timestamp DEFAULT now() NOT NULL,
	"updated_at" timestamp DEFAULT now() NOT NULL,
	CONSTRAINT "user_settings_user_id_unique" UNIQUE("user_id")
);
--> statement-breakpoint
ALTER TABLE "user_settings" ADD CONSTRAINT "user_settings_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;