Monorepo containing core modules of Zeichen.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

16 行
351 B

  1. import models from './src/models'
  2. export const up = async queryInterface => {
  3. models.forEach(m => {
  4. queryInterface.createTable(m.tableName, m.rawAttributes)
  5. })
  6. }
  7. export const down = async (queryInterface) => {
  8. models
  9. .reduce((reverse, m) => [m, ...reverse], [])
  10. .forEach(m => {
  11. queryInterface.dropTable(m.tableName)
  12. })
  13. }