Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
620 B
1
Indexable
Never
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');
    },
  };
Leave a Comment