<p>Don't rely on the committed structure.sql being up to date.</p>
<p>What usually happens though is that running the tests dumps structure.sql from the dev database and then reloads it into the test database. That is what db:test:prepare really does I believe, and as I understand it that runs when test is run, except that we keep getting reports that sometimes it doesn't and nobody has ever been able to figure out the details. See <a href="https://github.com/openstreetmap/openstreetmap-website/issues/878" class="issue-link js-issue-link" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/878" data-id="55155355" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#878</a> for a related issue.</p>
<p>Personally I never have this problem when I create a new branch with a new database...</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/openstreetmap/openstreetmap-website/issues/1121#issuecomment-168139895">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLcveciQz-BKLiooMDig9PRQU8bjPks5pVNCigaJpZM4G9Cd7.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/issues/1121#issuecomment-168139895"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>