Untitled
unknown
plain_text
2 years ago
620 B
5
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