SHARE
TWEET

Untitled

a guest Oct 16th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module.exports = {
  2.   up: (queryInterface, DataTypes) => {
  3.     return queryInterface.createTable('cars', {
  4.       id: {
  5.         allowNull: false,
  6.         autoIncrement: true,
  7.         primaryKey: true,
  8.         type: DataTypes.INTEGER,
  9.       },
  10.       name: {
  11.         allowNull: false,
  12.         type: DataTypes.STRING,
  13.       },
  14.       created_at: {
  15.         allowNull: false,
  16.         type: DataTypes.DATE,
  17.       },
  18.       updated_at: {
  19.         allowNull: true,
  20.         type: DataTypes.DATE,
  21.       },
  22.       deleted_at: {
  23.         allowNull: true,
  24.         type: DataTypes.DATE,
  25.       },
  26.     });
  27.   },
  28.   down: (queryInterface) => {
  29.     return queryInterface.dropTable('cars');
  30.   }
  31. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top