chore: Remove long deprecated database columns (#3821)

* chore: Remove long deprecated database columns

* test

* Update 20220720221531-remove-deprecated-columns.js

* fix rollback

* Add guard for upgrading past v0.54.0
This commit is contained in:
Tom Moor
2022-08-25 19:52:01 +01:00
committed by GitHub
parent a869ab7609
commit 864f585e5b
3 changed files with 61 additions and 12 deletions

View File

@@ -28,13 +28,6 @@ class Attachment extends IdModel {
@Column
key: string;
@Length({
max: 4096,
msg: "url must be 4096 characters or less",
})
@Column
url: string;
@Length({
max: 255,
msg: "contentType must be 255 characters or less",
@@ -69,10 +62,6 @@ class Attachment extends IdModel {
return getFileByKey(this.key);
}
/**
* Use this instead of url which will be deleted soon, the column is unneccessary
* and was not updated with the migraiton to the new s3 bucket.
*/
get canonicalUrl() {
return `${publicS3Endpoint()}/${this.key}`;
}