Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  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. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement