refactor(database): ♻️ Clean up database schema

This commit is contained in:
Jesse Wierzbinski 2024-12-18 21:52:53 +01:00
parent c334cd9cc8
commit 6f97f9f8f1
No known key found for this signature in database
4 changed files with 2339 additions and 154 deletions

View file

@ -0,0 +1,11 @@
ALTER TABLE "VersiaObject" DISABLE ROW LEVEL SECURITY;--> statement-breakpoint
DROP TABLE "VersiaObject" CASCADE;--> statement-breakpoint
ALTER TABLE "Likes" RENAME COLUMN "createdAt" TO "created_at";--> statement-breakpoint
ALTER TABLE "Notes" RENAME COLUMN "createdAt" TO "created_at";--> statement-breakpoint
ALTER TABLE "Notes" RENAME COLUMN "updatedAt" TO "updated_at";--> statement-breakpoint
ALTER TABLE "Notifications" RENAME COLUMN "createdAt" TO "created_at";--> statement-breakpoint
ALTER TABLE "Reaction" RENAME COLUMN "update_at" TO "updated_at";--> statement-breakpoint
ALTER TABLE "OpenIdAccounts" DROP CONSTRAINT "OpenIdAccounts_userId_Users_id_fk";
--> statement-breakpoint
ALTER TABLE "OpenIdAccounts" ADD CONSTRAINT "OpenIdAccounts_userId_Users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."Users"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "Users" ADD CONSTRAINT "Users_uri_unique" UNIQUE("uri");

File diff suppressed because it is too large Load diff

View file

@ -274,6 +274,13 @@
"when": 1734548407684,
"tag": "0038_friendly_supernaut",
"breakpoints": true
},
{
"idx": 39,
"version": "7",
"when": 1734555117380,
"tag": "0039_special_serpent_society",
"breakpoints": true
}
]
}