Untitled
unknown
plain_text
a year ago
1.1 kB
4
Indexable
import { Model, QueryInterface, DataTypes } from 'sequelize'; import Matchs from '../../Interfaces/IMatchs'; export default { up(queryInterface: QueryInterface) { return queryInterface.createTable<Model>('matches', { id: { type: DataTypes.INTEGER, primaryKey: true, allowNull: false, autoIncrement: true, }, home_team_id: { type: DataTypes.INTEGER, allowNull: false, field: 'home_team_id', }, home_team_goals: { type: DataTypes.INTEGER, allowNull: false, field: 'home_team_goals', }, away_team_id: { type: DataTypes.INTEGER, allowNull: false, field: 'away_team_id', }, away_team_goals: { type: DataTypes.INTEGER, allowNull: false, field: 'away_team_goals', }, in_progress: { type: DataTypes.BOOLEAN, allowNull: false, field: 'in_progress', }, }); }, down(queryInterface: QueryInterface) { return queryInterface.dropTable('matches'); }, };
Editor is loading...
Leave a Comment