Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/big-timers-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'rushdb-core': patch
'rushdb-docs': patch
'@rushdb/javascript-sdk': patch
'@rushdb/mcp-server': patch
'@rushdb/skills': patch
'rushdb-dashboard': patch
---

SQL migrations sync fix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE "oauth_refresh_tokens" (
CREATE TABLE IF NOT EXISTS "oauth_refresh_tokens" (
"id" text PRIMARY KEY NOT NULL,
"consent_id" text NOT NULL,
"client_id" text NOT NULL,
Expand All @@ -9,4 +9,10 @@ CREATE TABLE "oauth_refresh_tokens" (
"expires_at" text NOT NULL
);
--> statement-breakpoint
ALTER TABLE "oauth_refresh_tokens" ADD CONSTRAINT "oauth_refresh_tokens_consent_id_oauth_consents_id_fk" FOREIGN KEY ("consent_id") REFERENCES "public"."oauth_consents"("id") ON DELETE cascade ON UPDATE no action;
DO $$ BEGIN
IF NOT EXISTS (
SELECT 1 FROM pg_constraint WHERE conname = 'oauth_refresh_tokens_consent_id_oauth_consents_id_fk'
) THEN
ALTER TABLE "oauth_refresh_tokens" ADD CONSTRAINT "oauth_refresh_tokens_consent_id_oauth_consents_id_fk" FOREIGN KEY ("consent_id") REFERENCES "public"."oauth_consents"("id") ON DELETE cascade ON UPDATE no action;
END IF;
END $$;
Loading