Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Database Migrations

meghanlarson edited this page Nov 18, 2014 · 4 revisions

From the sails.js docs:

Make sure your database is set-up on the production server. This is especially important if you are using a relational database such as MySQL, because sails sets all your models to migrate:safe when run in production, which means no auto-migrations are run on starting up the app. You can set your database up the following way:

  • Create the database on the server and then run your sails app with migrate:alter locally, but configured to use the production server as your db. This will automatically set things up.
  • In case you can't connect to the server remotely, you'll simply dump your local schema and import it into the database server.
Clone this wiki locally