CREATE TABLE "google_oauth_token" (
	"id" text PRIMARY KEY NOT NULL,
	"refresh_token" text NOT NULL,
	"access_token" text,
	"scope" text NOT NULL,
	"token_type" text DEFAULT 'Bearer' NOT NULL,
	"expires_at" timestamp,
	"connected_email" text,
	"connected_by_user_id" text,
	"connected_at" timestamp DEFAULT now() NOT NULL,
	"updated_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "google_oauth_token" ADD CONSTRAINT "google_oauth_token_connected_by_user_id_user_id_fk" FOREIGN KEY ("connected_by_user_id") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;