From 900d74eae62cbb4c383e4fe22613e2bfd047734c Mon Sep 17 00:00:00 2001 From: Troplo Date: Fri, 29 Jul 2022 21:56:16 +1000 Subject: [PATCH] update migration case sensitivity --- backend/migrations/20220329054753-communications.js | 4 ++-- backend/migrations/20220518100447-friendsStatus.js | 2 +- backend/migrations/20220518113512-friendsStatus2.js | 3 +-- backend/migrations/20220519081007-lastRead.js | 2 +- backend/migrations/20220526072731-replying.js | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/backend/migrations/20220329054753-communications.js b/backend/migrations/20220329054753-communications.js index 2901572..1e5169d 100644 --- a/backend/migrations/20220329054753-communications.js +++ b/backend/migrations/20220329054753-communications.js @@ -181,7 +181,7 @@ module.exports = { type: Sequelize.DATE } }) - await queryInterface.addColumn("users", "privacy", { + await queryInterface.addColumn("Users", "privacy", { type: Sequelize.JSON, defaultValue: { communications: { @@ -193,7 +193,7 @@ module.exports = { }, allowNull: false }) - await queryInterface.createTable("friends", { + await queryInterface.createTable("Friends", { id: { allowNull: false, autoIncrement: true, diff --git a/backend/migrations/20220518100447-friendsStatus.js b/backend/migrations/20220518100447-friendsStatus.js index 62327d7..0dec26e 100644 --- a/backend/migrations/20220518100447-friendsStatus.js +++ b/backend/migrations/20220518100447-friendsStatus.js @@ -2,7 +2,7 @@ module.exports = { up: async (queryInterface, Sequelize) => { - await queryInterface.addColumn("friends", "status", { + await queryInterface.addColumn("Friends", "status", { type: Sequelize.ENUM(["pending", "accepted", "declined"]), allowNull: false, defaultValue: "pending" diff --git a/backend/migrations/20220518113512-friendsStatus2.js b/backend/migrations/20220518113512-friendsStatus2.js index fe39edf..0af4df9 100644 --- a/backend/migrations/20220518113512-friendsStatus2.js +++ b/backend/migrations/20220518113512-friendsStatus2.js @@ -2,8 +2,7 @@ module.exports = { up: async (queryInterface, Sequelize) => { - // modify status column - await queryInterface.changeColumn("friends", "status", { + await queryInterface.changeColumn("Friends", "status", { type: Sequelize.ENUM([ "pending", "pendingCanAccept", diff --git a/backend/migrations/20220519081007-lastRead.js b/backend/migrations/20220519081007-lastRead.js index 107bac4..9181d87 100644 --- a/backend/migrations/20220519081007-lastRead.js +++ b/backend/migrations/20220519081007-lastRead.js @@ -2,7 +2,7 @@ module.exports = { up: async (queryInterface, Sequelize) => { - await queryInterface.addColumn("chatAssociations", "lastRead", { + await queryInterface.addColumn("ChatAssociations", "lastRead", { type: Sequelize.BIGINT, allowNull: true }) diff --git a/backend/migrations/20220526072731-replying.js b/backend/migrations/20220526072731-replying.js index f83a171..d7da418 100644 --- a/backend/migrations/20220526072731-replying.js +++ b/backend/migrations/20220526072731-replying.js @@ -2,7 +2,7 @@ module.exports = { async up(queryInterface, Sequelize) { - await queryInterface.addColumn("messages", "replyId", { + await queryInterface.addColumn("Messages", "replyId", { type: Sequelize.BIGINT, defaultValue: null })