mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 13:59:16 +01:00
refactor(database): ♻️ Clean up database schema
This commit is contained in:
parent
c334cd9cc8
commit
6f97f9f8f1
4 changed files with 2339 additions and 154 deletions
11
drizzle/migrations/0039_special_serpent_society.sql
Normal file
11
drizzle/migrations/0039_special_serpent_society.sql
Normal 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");
|
||||
2237
drizzle/migrations/meta/0039_snapshot.json
Normal file
2237
drizzle/migrations/meta/0039_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue