Renamed collections table and added a new column for documents

This commit is contained in:
Jori Lallo
2017-06-03 12:04:13 -07:00
parent 524bfba443
commit 9631e58e65
2 changed files with 19 additions and 3 deletions

View File

@@ -0,0 +1,14 @@
module.exports = {
up: (queryInterface, Sequelize) => {
queryInterface.renameTable('atlases', 'collections');
queryInterface.addColumn('collections', 'documents', {
type: Sequelize.ARRAY(Sequelize.JSONB),
allowNull: true,
});
},
down: (queryInterface, _Sequelize) => {
queryInterface.renameTable('collections', 'atlases');
queryInterface.removeColumn('atlases', 'documents');
},
};