Advertisement
Guest User

Untitled

a guest
Jul 4th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict';
  2. module.exports = {
  3.   up: (queryInterface, Sequelize) => {
  4.     return queryInterface.createTable('faqs', {
  5.       id: {
  6.         allowNull: false,
  7.         autoIncrement: true,
  8.         primaryKey: true,
  9.         type: Sequelize.INTEGER
  10.       },
  11.       title:{
  12.         type: Sequelize.STRING,
  13.         unique: true,
  14.         allowNull:false
  15.       },
  16.       descricao:{
  17.         type: Sequelize.STRING,
  18.       },
  19.       lingua:{
  20.         type: Sequelize.STRING,
  21.       },
  22.       createdAt: {
  23.         allowNull: false,
  24.         type: Sequelize.DATE
  25.       },
  26.       updatedAt: {
  27.         allowNull: false,
  28.         type: Sequelize.DATE
  29.       },
  30.       categoriaId: {
  31.         type: Sequelize.INTEGER,
  32.        
  33.       },
  34.     });
  35.   },
  36.   down: (queryInterface, Sequelize) => {
  37.     return queryInterface.dropTable('faqs');
  38.   }
  39. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement