20191202054738-create_sites_table.js 753 B

1234567891011121314151617181920212223242526272829303132333435
  1. 'use strict'
  2. module.exports = {
  3. up: (queryInterface, Sequelize) => {
  4. return queryInterface.createTable('sites', {
  5. id: {
  6. primaryKey: true,
  7. autoIncrement: true,
  8. type: Sequelize.BIGINT.UNSIGNED
  9. },
  10. name: {
  11. allowNull: false,
  12. type: Sequelize.STRING(20)
  13. }
  14. })
  15. /*
  16. Add altering commands here.
  17. Return a promise to correctly handle asynchronicity.
  18. Example:
  19. return queryInterface.createTable('users', { id: Sequelize.INTEGER });
  20. */
  21. },
  22. down: (queryInterface, Sequelize) => {
  23. /*
  24. Add reverting commands here.
  25. Return a promise to correctly handle asynchronicity.
  26. Example:
  27. return queryInterface.dropTable('users');
  28. */
  29. }
  30. }