Skip to content

Running node migrations manually

For example, partner portal is a node process using sequelize to access database. Automatic database migrations are disabled as there were issues so they must be run manually.

Check https://sequelize.org/master/manual/migrations.html

Install sequelize

sudo npm install -g sequelize --save
sudo npm install -g sequelize-cli --save
sudo npm install pg -g --save

Switch node 10

sudo npm install -g n
sudo n 10

For aholapartnerportal app the updates can be done by checking out latest app and then running follow command in src/modules/db:

To check status

npx sequelize-cli db:migrate:status --url "postgres://partner_portal_nightly:(password)@35.228.143.173/partner_portal_nightly"

To run migrations:

npx sequelize-cli db:migrate --url "postgres://partner_portal_nightly:(password)@35.228.84.52/partner_portal_nightly"