Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AMBERMW13 committed Dec 20, 2024
2 parents 80c6bf8 + ecf7031 commit ceb54e8
Show file tree
Hide file tree
Showing 15 changed files with 115 additions and 49 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
<body>
<p class="warning" MadCap:autonum="&lt;b&gt;Warning: &lt;/b&gt;">Custom policy checks are not isolated and can interact both with local file systems and network utilities like the targeted database. It is a best practice to review all checks prior to execution to ensure they only affect the intended object(s).</p>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ LIQUIBASE_MONGODB_ADJUST_TRACKING_TABLES_ON_STARTUP</code></pre>
<MadCap:snippetBlock src="../def/attributes/cli/mongodb/cli-global-mongodb-adjust-tracking-tables-on-startup.flsnp" />
</td>
</tr>
<tr MadCap:conditions="exclude.future-mongodb">
<tr MadCap:conditions="">
<td><pre xml:space="preserve"><code class="language-text">--mongodb-oidc-authentication-mechanism
globalArgs: {mongodb-oidc-authentication-mechanism: "val"}
liquibase.mongodb.oidc.authenticationMechanism
Expand All @@ -37,7 +37,7 @@ LIQUIBASE_MONGODB_OIDC_AUTHENTICATION_MECHANISM</code></pre>
<MadCap:snippetBlock src="../def/attributes/cli/mongodb/cli-global-mongodb-oidc-authentication-mechanism.flsnp" />
</td>
</tr>
<tr MadCap:conditions="exclude.future-mongodb">
<tr MadCap:conditions="">
<td><pre xml:space="preserve"><code class="language-text">--mongodb-oidc-environment
globalArgs: {mongodb-oidc-environment: "val"}
liquibase.mongodb.oidc.environment
Expand All @@ -49,7 +49,7 @@ LIQUIBASE_MONGODB_OIDC_ENVIRONMENT</code></pre>
<MadCap:snippetBlock src="../def/attributes/cli/mongodb/cli-global-mongodb-oidc-environment.flsnp" />
</td>
</tr>
<tr MadCap:conditions="exclude.future-mongodb">
<tr MadCap:conditions="">
<td><pre xml:space="preserve"><code class="language-text">--mongodb-oidc-oidc-application-id-uri
globalArgs: {mongodb-oidc-oidc-application-id-uri: "val"}
liquibase.mongodb.oidc.oidcApplicationIDURI
Expand All @@ -61,7 +61,7 @@ LIQUIBASE_MONGODB_OIDC_OIDC_APPLICATION_ID_URI</code></pre>
<MadCap:snippetBlock src="../def/attributes/cli/mongodb/cli-global-mongodb-oidc-oidc-application-uri.flsnp" />
</td>
</tr>
<tr MadCap:conditions="exclude.future-mongodb">
<tr MadCap:conditions="">
<td><pre xml:space="preserve"><code class="language-text">--mongodb-oidc-oidc-client-id
globalArgs: {mongodb-oidc-oidc-client-id: "val"}
liquibase.mongodb.oidc.oidcClientID
Expand Down
12 changes: 3 additions & 9 deletions Content/change-types/modify-sql.htm
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@
</head>
<body>
<h1 id="modifying-generated-sql">modifySql</h1>
<p><code>modifySql</code> allows you to change data types or add additional vendor-specific clauses such as <code>ENGINE INNODB</code> to <code>CREATE TABLE</code> statements. <strong>Available in <MadCap:variable name="General.Liquibase" /> 1.9+</strong></p>
<p><code>modifySql</code> allows you to change data types or add additional vendor-specific clauses such as <code>ENGINE INNODB</code> to <code>CREATE TABLE</code> statements. <strong>Available in <MadCap:variable name="General.Liquibase" /> 1.9+</strong></p>
<h2>Uses</h2>
<p>Although <MadCap:variable name="General.Liquibase" /> supports most standard SQL statements with its <MadCap:variable name="General.changetypes" />s, there are times when you need the generated SQL to be different. This <MadCap:variable name="General.changetypes" /> allows you to change data types or add additional vendor-specific clauses such as <code>ENGINE INNODB</code> to <code>CREATE TABLE</code> statements.</p>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">The <code>modifySql</code><MadCap:variable name="General.changetypes" /> is only available in XML, YAML, and JSON formatted <MadCap:variable name="General.changelog" />s.</p>
<h2>Running the <code>modifySql</code><MadCap:variable name="General.changetypes" /></h2>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">The <code>modifySql</code>&#160;<MadCap:variable name="General.changetypes" /> is only available in XML, YAML, and JSON formatted <MadCap:variable name="General.changelog" />s.</p>
<h2>Running the <code>modifySql</code>&#160;<MadCap:variable name="General.changetypes" /></h2>
<MadCap:snippetBlock src="../Z_Resources/Snippets/text/change-type-run-syntax.flsnp" />
<p>Now, you should see a new table.</p>
<h2 id="available-attributes">Available <MadCap:variable name="General.Param/Attribute" />s</h2>
<table>
<col style="width: 280px;" />
<col style="width: 280px;" />
<thead>
<tr>
<th><MadCap:variable name="General.Param/Attr/Uppercased" />
Expand Down Expand Up @@ -45,9 +43,6 @@ <h2 id="available-attributes">Available <MadCap:variable name="General.Param/Att
</table>
<h2 id="available-sub-tags">Available subtags</h2>
<table>
<col style="width: 300px;" />
<col style="width: 300px;" />
<col style="width: 300px;" />
<thead>
<tr>
<th>Subtag</th>
Expand Down Expand Up @@ -75,7 +70,6 @@ <h2 id="available-sub-tags">Available subtags</h2>
<li><b>replace</b> – the text to replace.</li>
<li><b>with</b> – the text with which to replace.</li>
</ul>
<p><![CDATA[ ]]></p>
</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h2><code>--checks-scope=changelog</code> process<br /></h2>
<li>Enable the check.</li>
<li>Run <code class="language-text">liquibase checks run --checks-scope=changelog --changelog-file=yourName-createTable-changelog.xml</code>.</li>
</ul>
<h2><code>checks-scope=database</code> process</h2>
<h2><code>--checks-scope=database</code> process</h2>
<p>Users can establish which database the checks will be run against by specifying the desired database in the <code class="language-text">url</code> parameter within the <code class="language-text"><MadCap:variable name="General.liquiPropFile" /></code> file or the environment variable equivalent. The database is typically a JDBC connection string. A <MadCap:xref href="../../inspection/snapshot.html?">snapshot</MadCap:xref>, which is a reference to a <MadCap:variable name="General.Liquibase" />-created file describing the database, is automatically created if a live JDBC URL is used and any database-scoped checks are enabled. A snapshot can also be created manually by establishing an offline database URL.</p>
<p>Users should be aware that some data types and settings change when checks-scope database is performed. Some examples are listed below.<br /></p>
<ul>
Expand All @@ -101,11 +101,11 @@ <h3>Manually create a snapshot and run checks</h3>
<p>Users can take a snapshot of their database manually and run checks against it if they prefer using an offline database URL. They must first establish a snapshot and then enter the offline location in their <code class="language-text"><MadCap:variable name="General.liquiPropFile" /></code> file to run the command successfully:</p>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">This snapshot is not permanently retained.</p>
<ol>
<li> Run <code class="language-text">liquibase --output-file=mySnapshot.json snapshot --snapshotFormat=json</code> to create a snapshot. Replace <code class="language-text">mySnapshot.json</code> and <code class="language-text">=json</code> with the desired snapshot file title and format.</li>
<li>Add the offline snapshot URL to the <code class="language-text"><MadCap:variable name="General.liquiPropFile" /></code> file: </li><pre xml:space="preserve">liquibase.command.url: offline:DB_SHORTNAME?snapshot=mySnapshot.json</pre>
<li>Create a snapshot using the following command. Replace <code class="language-text">mySnapshot.json</code> and <code class="language-text">=json</code> with the desired snapshot file title and format.</li><pre><code class="language-text">liquibase --output-file=mySnapshot.json snapshot --snapshotFormat=json</code></pre>
<li>Add the offline snapshot URL to the <code class="language-text"><MadCap:variable name="General.liquiPropFile" /></code> file: </li><pre xml:space="preserve"><code class="language-text">liquibase.command.url: offline:DB_SHORTNAME?snapshot=mySnapshot.json</code></pre>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">Replace <code class="language-text">DB_SHORTNAME</code> with the database type being used (SQL, XML, YAML, or JSON). Also replace <code class="language-text">mySnapshot.json</code> with the desired snapshot file title and format.</p>
<p>The type of database is determined from the <code class="language-text">url</code> property if at least one database scope check is enabled. If the database cannot be determined, <MadCap:variable name="General.Liquibase" /> automatically generates SQL to check against using H2.</p>
<li>Run the <code class="language-text">checks-run</code> command:</li><pre><code class="language-text">liquibase checks run --checks-scope=database --url="offline:oracle?snapshot=mySnapshot.json"</code></pre>
<li>Run the <code class="language-text">checks run</code> command:</li><pre><code class="language-text">liquibase checks run --checks-scope=database --url="offline:oracle?snapshot=mySnapshot.json"</code></pre>
</ol>
<MadCap:dropDown>
<MadCap:dropDownHead>
Expand Down
Loading

0 comments on commit ceb54e8

Please sign in to comment.