Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = {
- up: (queryInterface, DataTypes) => {
- return queryInterface.createTable('cars', {
- id: {
- allowNull: false,
- autoIncrement: true,
- primaryKey: true,
- type: DataTypes.INTEGER,
- },
- name: {
- allowNull: false,
- type: DataTypes.STRING,
- },
- created_at: {
- allowNull: false,
- type: DataTypes.DATE,
- },
- updated_at: {
- allowNull: true,
- type: DataTypes.DATE,
- },
- deleted_at: {
- allowNull: true,
- type: DataTypes.DATE,
- },
- });
- },
- down: (queryInterface) => {
- return queryInterface.dropTable('cars');
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement