update migration case sensitivity

This commit is contained in:
Troplo 2022-07-29 21:56:16 +10:00
parent f1658810b8
commit 900d74eae6
5 changed files with 6 additions and 7 deletions

View file

@ -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,

View file

@ -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"

View file

@ -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",

View file

@ -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
})

View file

@ -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
})