Making schema changes in production environment with Sequelize with no data loss
<p>I'm using <a href="http://docs.sequelizejs.com/en/latest/" rel="nofollow">Sequelize</a> as my ORM for a PostgreSQL database, and need some pointers on making schema changes in production without data loss:</p>

<pre><code>// model usage
var User = require('./user')
var Page = require('./page')
var Theme = require('./theme')

User.sync({
    force: true
})

Page.sync({
    force: true
})

Theme.sync({
    force: true
})
</code></pre>

<p>In development, I have data loss each time I restart my API server because I have <code>force: true</code>. This is manageable, because it's development.
But I obviously don't want this for my production environment, but how do I get around this issue:</p>

<ol>
<li>I have a user's schema: name, age, etc...</li>
<li>A user signs up</li>
<li>I then decide I'd also like to capture "email" and save it in the User's table.</li>
<li>Column "email" not found, because <code>force: false</code> in production</li>
</ol>

<p>How do I go about making sure my production schema is up to date? And that I can make these schema changes without data loss?</p>

<p>I come from the Mongo world where this just isn't an issue, any advice is appreciated!</p>