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:
@@ -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}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user