<div dir="ltr">Hello all,<div><br></div><div>I'd like to see Ur/Web helping with database migrations. Currently, the compiler will output an SQL script containing DDL statements to create the schema from scratch.</div><div><br></div><div>Ur/Web largely follows a "code-first" approach: the program's code is authoritative source of the database schema (or, put it differently, program's code is enough to infer the definition of the database schema).</div><div><br></div><div>My idea is to have Ur/Web generate the database schema in a database-independent format (e.g. as some simple JSON), and then use a tool to find the diff/patch between two such schemas.</div><div><br></div><div>Having searched for off-the-shelf tools to help with generating DDL statements given two schemas expressed in a database-independent format, I came up with basically nothing that can be easily reused.[2]</div><div><br></div><div><div>I'm looking for help with the format definition (preferably something that comes with tools: e.g. convert schema definition to DDL of target database). Seems like the simplest/best way forward is to go with an Ur/Web-specific tool.</div><div><br></div>-- <br><div class="gmail_signature">Cheers,<br>Artyom Shalkhakov<br></div><div class="gmail_signature"><br></div><div class="gmail_signature">[1] <a href="https://github.com/urweb/urweb/issues/65">https://github.com/urweb/urweb/issues/65</a></div><div class="gmail_signature">[2] <a href="https://github.com/urweb/urweb/issues/65#issuecomment-277904189">https://github.com/urweb/urweb/issues/65#issuecomment-277904189</a></div>
</div></div>