npm install -g sequelize-cli To update the database after updating the app from git (on the command line in the webapp base directory): sequelize db:migrate To undo the last migrations: sequelize db:migrate:undo
14 lines
280 B
JavaScript
14 lines
280 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
up: function (query, Sequelize) {
|
|
var DataTypes = Sequelize; //Allow for more cut and paste :)
|
|
|
|
return query.addIndex('User', ['login'], {indicesType: 'UNIQUE', indexName: 'LOGIN_INDEX'});
|
|
},
|
|
|
|
down: function (query, Sequelize) {
|
|
|
|
}
|
|
};
|