-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2908 from OriginTrail/fix/remove-sha256Blob
Fix/remove sha256 blob
- Loading branch information
Showing
6 changed files
with
18 additions
and
19 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
17 changes: 17 additions & 0 deletions
17
...odules/repository/implementation/sequelize/migrations/20240201100000-remove-sha256Blob.js
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,17 @@ | ||
export async function up({ context: { queryInterface } }) { | ||
const tableInfo = await queryInterface.describeTable('shard'); | ||
|
||
if (tableInfo.sha256_blob) { | ||
await queryInterface.removeColumn('shard', 'sha256_blob'); | ||
} | ||
} | ||
|
||
export async function down({ context: { queryInterface, Sequelize } }) { | ||
const tableInfo = await queryInterface.describeTable('shard'); | ||
|
||
if (!tableInfo.sha256_blob) { | ||
await queryInterface.addColumn('shard', 'sha256_blob', { | ||
type: Sequelize.BLOB, | ||
}); | ||
} | ||
} |
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