20210127040341-create_admin_site_table.js 545 B

12345678910111213141516171819202122232425
  1. "use strict";
  2. module.exports = {
  3. up: (queryInterface, Sequelize) => {
  4. return queryInterface.createTable("admin_site", {
  5. id: {
  6. primaryKey: true,
  7. autoIncrement: true,
  8. type: Sequelize.BIGINT.UNSIGNED,
  9. },
  10. admin_id: {
  11. type: Sequelize.BIGINT.UNSIGNED,
  12. allowNull: false,
  13. },
  14. site_id: {
  15. type: Sequelize.BIGINT.UNSIGNED,
  16. allowNull: false,
  17. },
  18. });
  19. },
  20. down: (queryInterface, Sequelize) => {
  21. return queryInterface.dropTable("admin_site");
  22. },
  23. };