mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(database): ♻️ Make emojis use a Media instead of just rawdogging the URI
This commit is contained in:
parent
c7aae24d42
commit
cf1104d762
18 changed files with 4823 additions and 128 deletions
5
drizzle/migrations/0043_mute_jigsaw.sql
Normal file
5
drizzle/migrations/0043_mute_jigsaw.sql
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
ALTER TABLE "Emojis" ADD COLUMN "mediaId" uuid;--> statement-breakpoint
|
||||
ALTER TABLE "Emojis" ADD CONSTRAINT "Emojis_mediaId_Medias_id_fk" FOREIGN KEY ("mediaId") REFERENCES "public"."Medias"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint
|
||||
ALTER TABLE "Emojis" DROP COLUMN "url";--> statement-breakpoint
|
||||
ALTER TABLE "Emojis" DROP COLUMN "alt";--> statement-breakpoint
|
||||
ALTER TABLE "Emojis" DROP COLUMN "content_type";
|
||||
1
drizzle/migrations/0044_quiet_jasper_sitwell.sql
Normal file
1
drizzle/migrations/0044_quiet_jasper_sitwell.sql
Normal file
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE "Emojis" ALTER COLUMN "mediaId" SET NOT NULL;
|
||||
2331
drizzle/migrations/meta/0043_snapshot.json
Normal file
2331
drizzle/migrations/meta/0043_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
2331
drizzle/migrations/meta/0044_snapshot.json
Normal file
2331
drizzle/migrations/meta/0044_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -302,6 +302,20 @@
|
|||
"when": 1737660317024,
|
||||
"tag": "0042_swift_the_phantom",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 43,
|
||||
"version": "7",
|
||||
"when": 1738080562679,
|
||||
"tag": "0043_mute_jigsaw",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 44,
|
||||
"version": "7",
|
||||
"when": 1738082427051,
|
||||
"tag": "0044_quiet_jasper_sitwell",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue