Skip to content

Instantly share code, notes, and snippets.

@bstoots
Created November 18, 2018 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bstoots/93108f8f82706dfaaebabc97f201e6f2 to your computer and use it in GitHub Desktop.
Save bstoots/93108f8f82706dfaaebabc97f201e6f2 to your computer and use it in GitHub Desktop.
Example of foreignKey element reordered such that resultant XML is no longer DTD-compliant #121
<?xml version="1.0" encoding="utf-8"?>
<!--
foreignKey element reordered such that resultant XML is no longer DTD-compliant #121
https://github.com/dbsteward/dbsteward/issues/121
-->
<dbsteward>
<database>
<role>
<application>app</application>
<owner>pgsql</owner>
<replication></replication>
<readonly></readonly>
</role>
</database>
<schema name="public" owner="ROLE_OWNER">
<table name="table_a" owner="ROLE_OWNER" primaryKey="pkey_a">
<column name="pkey_a" type="bigserial" />
<column name="col_a_a" type="bigint" />
<column name="col_a_b" type="bigint" />
<constraint name="unique_a_b" type="unique" definition="(col_a_a, col_a_b)" />
<foreignKey columns="col_a_a, col_a_b" foreignSchema="public" foreignTable="table_b" foreignColumns="col_b_a, col_b_b" constraintName="unique_a_b" />
<grant role="ROLE_APPLICATION" operation="SELECT, INSERT, UPDATE, DELETE"/>
</table>
<table name="table_b" owner="ROLE_OWNER" primaryKey="pkey_b">
<column name="pkey_b" type="bigserial" />
<column name="col_b_a" type="bigint" />
<column name="col_b_b" type="bigint" />
<grant role="ROLE_APPLICATION" operation="SELECT, INSERT, UPDATE, DELETE"/>
</table>
</schema>
</dbsteward>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment