-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: generate thumbnails ahead of time
- Loading branch information
Showing
46 changed files
with
468 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Migration } from '@mikro-orm/migrations'; | ||
|
||
export class Migration20240516131911 extends Migration { | ||
|
||
async up(): Promise<void> { | ||
this.addSql('alter table "files" drop constraint "files_thumbnail_file_id_foreign";'); | ||
|
||
this.addSql('alter table "files" drop constraint "files_thumbnail_file_id_unique";'); | ||
this.addSql('alter table "files" drop column "thumbnail_file_id";'); | ||
} | ||
|
||
async down(): Promise<void> { | ||
this.addSql('alter table "files" add column "thumbnail_file_id" varchar(255) null;'); | ||
this.addSql('alter table "files" add constraint "files_thumbnail_file_id_foreign" foreign key ("thumbnail_file_id") references "thumbnails" ("file_id") on update cascade on delete set null;'); | ||
this.addSql('alter table "files" add constraint "files_thumbnail_file_id_unique" unique ("thumbnail_file_id");'); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.