CoastalCommitsPastes/server/src/migrations/01_user-add-role.ts

13 lines
380 B
TypeScript
Raw Normal View History

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