refactor(database): ♻️ Make emojis use a Media instead of just rawdogging the URI

This commit is contained in:
Jesse Wierzbinski 2025-01-28 17:43:43 +01:00
parent c7aae24d42
commit cf1104d762
No known key found for this signature in database
18 changed files with 4823 additions and 128 deletions

View 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";

View file

@ -0,0 +1 @@
ALTER TABLE "Emojis" ALTER COLUMN "mediaId" SET NOT NULL;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -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
}
]
}