0.1-migration.js 473 B

12345678910111213141516
  1. module.exports = {
  2. version: 0.1,
  3. name: 'Migration',
  4. description: 'Sets up the hidden `_version` table to track database schema version.',
  5. up: async (queryInterface, Sequelize) => {
  6. await queryInterface.createTable('_version', {
  7. key: {
  8. type: Sequelize.STRING,
  9. primaryKey: true
  10. },
  11. value: Sequelize.DOUBLE
  12. })
  13. await queryInterface.insert(null, '_version', { key: 'material-framework', value: 0.1 }, {})
  14. return 0.1
  15. }
  16. }