2022-04-20 01:14:08 -04:00
|
|
|
"use strict"
|
|
|
|
import { DataTypes } from "sequelize"
|
|
|
|
import type { Migration } from "../database"
|
|
|
|
|
|
|
|
export const up: Migration = async ({ context: queryInterface }) =>
|
2022-04-22 01:01:59 -04:00
|
|
|
Promise.all([
|
|
|
|
queryInterface.addColumn("users", "email", {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true
|
|
|
|
}),
|
|
|
|
queryInterface.addColumn("users", "displayName", {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true
|
|
|
|
}),
|
|
|
|
queryInterface.addColumn("users", "bio", {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true
|
|
|
|
})
|
|
|
|
])
|
2022-04-20 01:14:08 -04:00
|
|
|
|
|
|
|
export const down: Migration = async ({ context: queryInterface }) =>
|
2022-04-22 01:01:59 -04:00
|
|
|
Promise.all([
|
|
|
|
queryInterface.removeColumn("users", "email"),
|
|
|
|
queryInterface.removeColumn("users", "displayName"),
|
|
|
|
queryInterface.removeColumn("users", "bio")
|
|
|
|
])
|