Skip to content

Commit

Permalink
PD-3656: Formatted Mongo changelog draft
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-velonis1 committed Sep 8, 2023
1 parent 8c2c875 commit 732ad70
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,27 @@ CREATE TABLE test_table (test_id INT, test_column VARCHAR(255), PRIMARY KEY (tes
</MadCap:dropDown>
<p MadCap:conditions="database.mongodb">In each <MadCap:variable name="General.changeset" />, you must specify the <code>mongosh</code> native executor using the <code><MadCap:xref href="../../../../concepts/changelogs/attributes/runwith.htm">runWith</MadCap:xref></code>&#160;<MadCap:variable name="General.Param/Attribute" />:</p>
<ul MadCap:conditions="database.mongodb">
<li MadCap:conditions="exclude.future">Formatted Mongo:&#160;<code>runWith:mongosh</code></li>
<li>XML: <code>runWith="mongosh"</code></li>
<li>YAML: <code>runWith: mongosh</code></li>
<li>JSON: <code>"runWith": "mongosh"</code></li>
</ul>
<MadCap:dropDown MadCap:conditions="database.mongodb,exclude.future">
<MadCap:dropDownHead>
<MadCap:dropDownHotspot>Formatted Mongo example</MadCap:dropDownHotspot>
</MadCap:dropDownHead>
<MadCap:dropDownBody>
<p>With the <MadCap:variable name="General.Liquibase" /> MongoDB&#160;Pro extension 1.?.?+, you can use a formatted Mongo <MadCap:variable name="General.changelog" /> for MongoDB Pro, similar to a <a href="../../../../concepts/changelogs/sql-format.html">formatted SQL <MadCap:variable name="General.changelog" /></a>. This lets you use <code>mongosh</code> scripts written in JavaScript directly in <MadCap:variable name="General.Liquibase" />.</p>
<p>All <MadCap:variable name="General.Liquibase" /> formatted Mongo <MadCap:variable name="General.changelog" />s must use the file extension <code>.JS</code> or <code>.js</code>. They must also begin with a <MadCap:variable name="General.changelog" /> header:&#160;<code>// liquibase formatted mongo</code>.</p><pre xml:space="preserve"><code class="language-javascript">// liquibase formatted mongo

// changeset my.devname:1 labels:example-label context:example-context runWith:mongosh
// comment: example comment

db = db.getSiblingDB('lbcat'); db.createCollection('customers');

// rollback db.customers.drop();</code></pre>
</MadCap:dropDownBody>
</MadCap:dropDown>
<MadCap:dropDown MadCap:conditions="database.mongodb">
<MadCap:dropDownHead>
<MadCap:dropDownHotspot style="font-size: 18pt;">XML example</MadCap:dropDownHotspot>
Expand Down
10 changes: 5 additions & 5 deletions Content/change-types/include.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
<head><title><MadCap:variable name="Heading.Level1" /></title>
<link rel="canonical" href="https://docs.liquibase.com/change-types/include.html" />
<meta name="description" content="The include tag allows you to break up your changelogs into more manageable pieces. Use the include tag in the root changelog to reference other changelogs." />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="The include tag allows you to break up your changelogs into more manageable pieces. Use the include tag in the root changelog to reference other changelogs." />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<h1><code>include</code>
Expand All @@ -17,9 +17,9 @@ <h2>How to use the <code>include</code> tag</h2>
<ol>
<li>Create a root <MadCap:variable name="General.changelog" /> file, if you do not have one already.</li>
<p>The root <MadCap:variable name="General.changelog" /> file works as a configuration file that will hold all the references to all your other <MadCap:variable name="General.changelog" />s. Your root <MadCap:variable name="General.changelog" /> file must be in an XML, YAML, or JSON format.</p>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">You cannot use the <code>&lt;include&gt;</code> tag in an SQL formatted root <MadCap:variable name="General.changelog" />.</p>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">You cannot use the <code>&lt;include&gt;</code> tag in an formatted SQL <MadCap:conditionalText MadCap:conditions="exclude.future">or formatted Mongo</MadCap:conditionalText> root <MadCap:variable name="General.changelog" />.</p>
<li>Add the <code>&lt;include&gt;</code> tag and file references to your root <MadCap:variable name="General.changelog" />.</li>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">Your reference <MadCap:variable name="General.changelog" /> can be SQL, XML, YAML, or JSON file types.</p>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">The <MadCap:variable name="General.changelog" />s you include in your root <MadCap:variable name="General.changelog" /> can be SQL, XML, YAML, or JSON file types. <MadCap:conditionalText MadCap:conditions="exclude.future">If you use the <a href="../start/tutorials/mongodb-pro.htm">MongoDB&#160;Pro extension</a> 1.?.?, you can also include formatted Mongo <MadCap:variable name="General.changelog" />s with the JS file type.</MadCap:conditionalText></p>
<MadCap:dropDown>
<MadCap:dropDownHead>
<MadCap:dropDownHotspot style="font-size: 18pt;">XML example</MadCap:dropDownHotspot>
Expand Down Expand Up @@ -143,4 +143,4 @@ <h2>Related links</h2>
</li>
</ul>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions Content/change-types/includeall.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ <h2>How to use the <code>includeAll</code> tag</h2>
<ol>
<li>Create a root <MadCap:variable name="General.changelog" /> file.</li>
<p>The root <MadCap:variable name="General.changelog" /> file works as a configuration file that holds all the references to other directories. Your root <MadCap:variable name="General.changelog" /> file must be in an XML, YAML, or JSON format.</p>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">At this time, the <code>&lt;includeAll&gt;</code> tag cannot be used in an SQL formatted root <MadCap:variable name="General.changelog" />.</p>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">At this time, the <code>&lt;includeAll&gt;</code> tag cannot be used in a formatted SQL <MadCap:conditionalText MadCap:conditions="exclude.future">or formatted Mongo</MadCap:conditionalText> root <MadCap:variable name="General.changelog" />.</p>
<li>Add the <code>&lt;includeAll&gt;</code> tag and file references to your root <MadCap:variable name="General.changelog" />.</li>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">Your <MadCap:variable name="General.changelog" />s inside of the directory can be in SQL, XML, YAML, or JSON file types.</p>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">Your <MadCap:variable name="General.changelog" />s inside of the directory can be in SQL, XML, YAML, or JSON file types.<MadCap:conditionalText MadCap:conditions="exclude.future">If you use the <a href="../start/tutorials/mongodb-pro.htm">MongoDB&#160;Pro extension</a> 1.?.?, you can also include formatted Mongo <MadCap:variable name="General.changelog" />s with the JS file type.</MadCap:conditionalText></p>
<MadCap:dropDown>
<MadCap:dropDownHead>
<MadCap:dropDownHotspot style="font-size: 18pt;">XML example</MadCap:dropDownHotspot>
Expand Down

0 comments on commit 732ad70

Please sign in to comment.