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 type: Sequelize.DATE
} }
}) })
await queryInterface.addColumn("users", "privacy", { await queryInterface.addColumn("Users", "privacy", {
type: Sequelize.JSON, type: Sequelize.JSON,
defaultValue: { defaultValue: {
communications: { communications: {
@ -193,7 +193,7 @@ module.exports = {
}, },
allowNull: false allowNull: false
}) })
await queryInterface.createTable("friends", { await queryInterface.createTable("Friends", {
id: { id: {
allowNull: false, allowNull: false,
autoIncrement: true, autoIncrement: true,

View file

@ -2,7 +2,7 @@
module.exports = { module.exports = {
up: async (queryInterface, Sequelize) => { up: async (queryInterface, Sequelize) => {
await queryInterface.addColumn("friends", "status", { await queryInterface.addColumn("Friends", "status", {
type: Sequelize.ENUM(["pending", "accepted", "declined"]), type: Sequelize.ENUM(["pending", "accepted", "declined"]),
allowNull: false, allowNull: false,
defaultValue: "pending" defaultValue: "pending"

View file

@ -2,8 +2,7 @@
module.exports = { module.exports = {
up: async (queryInterface, Sequelize) => { up: async (queryInterface, Sequelize) => {
// modify status column await queryInterface.changeColumn("Friends", "status", {
await queryInterface.changeColumn("friends", "status", {
type: Sequelize.ENUM([ type: Sequelize.ENUM([
"pending", "pending",
"pendingCanAccept", "pendingCanAccept",

View file

@ -2,7 +2,7 @@
module.exports = { module.exports = {
up: async (queryInterface, Sequelize) => { up: async (queryInterface, Sequelize) => {
await queryInterface.addColumn("chatAssociations", "lastRead", { await queryInterface.addColumn("ChatAssociations", "lastRead", {
type: Sequelize.BIGINT, type: Sequelize.BIGINT,
allowNull: true allowNull: true
}) })

View file

@ -2,7 +2,7 @@
module.exports = { module.exports = {
async up(queryInterface, Sequelize) { async up(queryInterface, Sequelize) {
await queryInterface.addColumn("messages", "replyId", { await queryInterface.addColumn("Messages", "replyId", {
type: Sequelize.BIGINT, type: Sequelize.BIGINT,
defaultValue: null defaultValue: null
}) })