Untitled
unknown
plain_text
a year ago
620 B
4
Indexable
import { Model, QueryInterface, DataTypes } from 'sequelize'; import ITeam from '../../Interfaces/ITeams'; export default { up(queryInterface: QueryInterface) { return queryInterface.createTable<Model<ITeam>>('teams', { id: { type: DataTypes.INTEGER, allowNull: false, autoIncrement: true, primaryKey: true, }, teamName: { type: DataTypes.STRING, allowNull: false, field: 'team_name', }, }); }, down(queryInterface: QueryInterface) { return queryInterface.dropTable('teams'); }, };
Editor is loading...
Leave a Comment