CoastalCommitsPastes/server/src/migrations/01_user-add-role.ts
2022-03-29 00:19:33 -07:00

12 lines
380 B
TypeScript

"use strict"
import { DataTypes } from "sequelize"
import type { Migration } from "../database"
export const up: Migration = async ({ context: queryInterface }) =>
queryInterface.addColumn("users", "role", {
type: DataTypes.STRING,
defaultValue: "user"
})
export const down: Migration = async ({ context: queryInterface }) =>
queryInterface.removeColumn("users", "role")