<div dir="ltr">Step one: Whoever yells loudest gets to keep their database<div>Step two: Everyone else does rails db:reset on their development databases, and possibly just db:schema:load on their test ones if you have seed data you don't want in your test db.</div><div><br></div><div>The key is that db:schema:load reads from the schema file as-is, rather than reading from the migrations and re-constructing the schema from the database.</div><div><br></div><div> - Patrick</div><div><br></div><div><a href="https://whyarentyoucoding.com/">Why aren't you coding?</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 1 Mar 2021 at 08:10, Stuart Harrison <<a href="mailto:pezholio@gmail.com">pezholio@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Morning LRUG</div><div><br></div><div>I wanted to share an annoyance I've had on multiple projects, and wondered if anyone had any fixes for it? <br></div><div><br></div><div>If there are multiple devs on a project committing a bunch of migrations and running `db:migrate`, it seems that, over time, the order of columns in the schema.rb file jumps around every time the command is run. <br></div><div><br></div><div>I can get around this by only committing the relevant line(s) when I run a migration, but this does get annoying. <br></div><div><br></div><div>I'm sure there is a solution, but it's disappeared out of my head, and seems to be an ungoogleable problem, so was wondering if anyone had come across a solution?</div><div><br></div><div>Cheers</div><div><br></div><div>Stu<br></div></div>
_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br>
Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>
Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>
List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</blockquote></div>