<p>To explain a bit more <a href="https://travis-ci.org/openstreetmap/openstreetmap-website/builds/170800818">https://travis-ci.org/openstreetmap/openstreetmap-website/builds/170800818</a> is what (since yesterday) will happen if you migrate the test database. The fix was <a href="https://github.com/openstreetmap/openstreetmap-website/commit/15395bb94403bd5f2ecb2d9887573cca58801b1f" class="commit-link"><tt>15395bb</tt></a> which makes sure to reinitialise the test database.</p>

<p>The reason for the difference is that the migrations populate the <code>languages</code> table, but the tests expect it to be empty. That is achieved by <code>rake test:db</code> because it dumps the schema (without any data) from the dev database and then uses that to recreate the test database.</p>

<p>Because travis only has one database the migrate there was migrating the test database, and changing the rake target made it then dump and recreate that database losing the data in the process.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1342#issuecomment-256578049">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLdukB20vl_mWDHzhu9PmNnKZ_Uqeks5q4F7ggaJpZM4Kh1Oa">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLQlZTpQ0Yq-Gler_SeVLSEcnfktAks5q4F7ggaJpZM4Kh1Oa.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/pull/1342#issuecomment-256578049"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"PERSON","message":"@tomhughes in #1342: To explain a bit more https://travis-ci.org/openstreetmap/openstreetmap-website/builds/170800818 is what (since yesterday) will happen if you migrate the test database. The fix was https://github.com/openstreetmap/openstreetmap-website/commit/15395bb94403bd5f2ecb2d9887573cca58801b1f which makes sure to reinitialise the test database.\r\n\r\nThe reason for the difference is that the migrations populate the `languages` table, but the tests expect it to be empty. That is achieved by `rake test:db` because it dumps the schema (without any data) from the dev database and then uses that to recreate the test database.\r\n\r\nBecause travis only has one database the migrate there was migrating the test database, and changing the rake target made it then dump and recreate that database losing the data in the process."}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/1342#issuecomment-256578049"}}}</script>