Skip to content

Instantly share code, notes, and snippets.

@stoffie
Created November 24, 2016 18:35
Show Gist options
  • Save stoffie/83893566e56253c96887ccfc794591d6 to your computer and use it in GitHub Desktop.
Save stoffie/83893566e56253c96887ccfc794591d6 to your computer and use it in GitHub Desktop.
I lost it
damiano@Z97P-D3:~/SE2_166312_MealManager$ PORT=3000 sails lift
info: Starting app...
-----------------------------------------------------------------
Excuse my interruption, but it looks like this app
does not have a project-wide "migrate" setting configured yet.
(perhaps this is the first time you're lifting it with models?)
In short, this setting controls whether/how Sails will attempt to automatically
rebuild the tables/collections/sets/etc. in your database schema.
You can read more about the "migrate" setting here:
http://sailsjs.org/#!/documentation/concepts/ORM/model-settings.html?q=migrate
In a production environment (NODE_ENV==="production") Sails always uses
migrate:"safe" to protect inadvertent deletion of your data.
However during development, you have a few other options for convenience:
1. safe - never auto-migrate my database(s). I will do it myself (by hand)
2. alter - auto-migrate, but attempt to keep my existing data (experimental)
3. drop - wipe/drop ALL my data and rebuild models every time I lift Sails
What would you like Sails to do?
info: To skip this prompt in the future, set `sails.config.models.migrate`.
info: Usually this is done in a config file (e.g. `config/models.js`),
info: or as an override (e.g. `sails lift --models.migrate='alter').
// HERE IS WHERE I LOST
warn: ** DO NOT CHOOSE "2" or "3" IF YOU ARE WORKING WITH PRODUCTION DATA **
prompt: ?:
Temporarily using `sails.config.models.migrate="safe"...
(press CTRL+C to cancel-- continuing lift automatically in 0.5 seconds...)
info:
info: .-..-.
info:
info: Sails <| .-..-.
info: v0.12.10 |\
info: /|.\
info: / || \
info: ,' |' \
info: .-'.-==|/_--'
info: `--'-------'
info: __---___--___---___--___---___--___
info: ____---___--___---___--___---___--___-__
info:
info: Server lifted in `/home/damiano/SE2_166312_MealManager`
info: To see your app, visit http://localhost:3000
info: To shut down Sails, press <CTRL> + C at any time.
debug: -------------------------------------------------------
debug: :: Thu Nov 24 2016 19:16:12 GMT+0100 (CET)
debug: Environment : development
debug: Port : 3000
debug: -------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment