Skip to content

Commit

Permalink
fix migration drop (#880)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernardo Vieira authored Sep 11, 2023
1 parent 902628d commit beb6ced
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ module.exports = {
try {
await queryInterface.removeConstraint('user', 'user_avatarMediaId_fkey');
} catch (e) { console.error(e); }
try {
await queryInterface.removeConstraint('community', 'community_coverMediaId_fkey');
} catch (e) { console.error(e); }
try {
await queryInterface.removeColumn('story_content', 'mediaMediaId');
} catch (e) { console.error(e); }
Expand All @@ -37,8 +40,12 @@ module.exports = {
try {
await queryInterface.sequelize.query(`drop table ubi_organization`, { type: Sequelize.QueryTypes.DELETE });
} catch (_) { }
await queryInterface.sequelize.query(`drop table app_media_thumbnail`, { type: Sequelize.QueryTypes.DELETE });
await queryInterface.sequelize.query(`drop table app_media_content`, { type: Sequelize.QueryTypes.DELETE });
try {
await queryInterface.sequelize.query(`drop table app_media_thumbnail`, { type: Sequelize.QueryTypes.DELETE });
} catch (_) { }
try {
await queryInterface.sequelize.query(`drop table app_media_content`, { type: Sequelize.QueryTypes.DELETE });
} catch (_) { }
try {
await queryInterface.sequelize.query(`drop table beneficiary`, { type: Sequelize.QueryTypes.DELETE });
} catch (_) { }
Expand Down

0 comments on commit beb6ced

Please sign in to comment.