<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:09:47 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[DOCS-14211] Add documentation for how to handle destructive changes in Realm</title>
                <link>https://jira.mongodb.org/browse/DOCS-14211</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;h2&gt;&lt;a name=&quot;Description&quot;&gt;&lt;/a&gt;Description&lt;/h2&gt;
&lt;p&gt;We only have this documented in Realm.io and even then it&apos;s quite hidden:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://docs.realm.io/sync/using-synced-realms/syncing-data#destructive-changes&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.realm.io/sync/using-synced-realms/syncing-data#destructive-changes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I believe this topic should be covered in docs.mongodb and include how to update schema with destructive changes. For e.g. a customer might update their client code changing the data type of an existing field which is already in the Realm schema. Development mode will not update this for them and they&apos;ll need to take extra steps such as deleting the field from the current schema, terminating sync, and running app etc.&lt;/p&gt;

&lt;p&gt;It would be good to add such documentation under &lt;a href=&quot;https://docs.mongodb.com/realm/sync/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Realm Sync&lt;/a&gt; and cover the subject thoroughly with multiple options on how to perform destructive changes.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;Scopeofchanges&quot;&gt;&lt;/a&gt;Scope of changes&lt;/h2&gt;

&lt;h2&gt;&lt;a name=&quot;ImpacttoOtherDocs&quot;&gt;&lt;/a&gt;Impact to Other Docs&lt;/h2&gt;

&lt;h2&gt;&lt;a name=&quot;MVP%28WorkandDate%29&quot;&gt;&lt;/a&gt;MVP (Work and Date)&lt;/h2&gt;

&lt;h2&gt;&lt;a name=&quot;Resources%28ScopeorDesignDocs%2CInvision%2Cetc.%29&quot;&gt;&lt;/a&gt;Resources (Scope or Design Docs, Invision, etc.)&lt;/h2&gt;
</description>
                <environment></environment>
        <key id="1620119">DOCS-14211</key>
            <summary>Add documentation for how to handle destructive changes in Realm</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13203">Gone away</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="mansoor.omar@mongodb.com">Mansoor Omar</reporter>
                        <labels>
                    </labels>
                <created>Wed, 10 Feb 2021 23:15:52 +0000</created>
                <updated>Fri, 27 Oct 2023 20:16:03 +0000</updated>
                            <resolved>Mon, 8 May 2023 19:04:22 +0000</resolved>
                                                                    <component>Realm</component>
                        <due></due>
                            <votes>1</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="5409341" author="JIRAUSER1270801" created="Mon, 8 May 2023 19:04:22 +0000"  >&lt;p&gt;This will be addressed in upcoming info. architecture restructure&lt;/p&gt;</comment>
                            <comment id="4179095" author="JIRAUSER1257879" created="Tue, 9 Nov 2021 22:29:36 +0000"  >&lt;p&gt;I see the ticket has been closed as &quot;gone away&quot; - not sure what this means?&lt;/p&gt;

&lt;p&gt;If documentation has been added/modified, could we please mention in the comments what exactly was done and a link to the document?&#160;&lt;/p&gt;</comment>
                            <comment id="4052957" author="ian.ward" created="Mon, 13 Sep 2021 12:49:44 +0000"  >&lt;p&gt;Understood &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mansoor.omar&quot; class=&quot;user-hover&quot; rel=&quot;mansoor.omar&quot;&gt;mansoor.omar&lt;/a&gt; - &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mohammad.hunan&quot; class=&quot;user-hover&quot; rel=&quot;mohammad.hunan&quot;&gt;mohammad.hunan&lt;/a&gt; do we have anything in the docs that spells this out in development mode? Presumably, the developer is not worried about losing data since they are in development so terminating and re-enabling sync is probably fine but you will need to wipe the state on the device and fix the schema to match on both ends before re-enabling sync on the serverside. &lt;/p&gt;</comment>
                            <comment id="4051930" author="JIRAUSER1257879" created="Mon, 13 Sep 2021 03:03:45 +0000"  >&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.mongodb.com/community/forums/t/what-is-the-proper-way-to-fix-destructive-changes/117251&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/community/forums/t/what-is-the-proper-way-to-fix-destructive-changes/117251&lt;/a&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="4051922" author="JIRAUSER1257879" created="Mon, 13 Sep 2021 02:58:48 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ian.ward&quot; class=&quot;user-hover&quot; rel=&quot;ian.ward&quot;&gt;ian.ward&lt;/a&gt; The scenario I&apos;m referring to is mostly one that we encounter when customers are still in development where they make the destructive change on the client side and have development mode enabled.&#160;&lt;/p&gt;

&lt;p&gt;We don&apos;t have anything documented which tells them they need to manually remove existing schema definitions in the cloud schema (whether it is by deleting one field or removing the entire collection schema) before dev mode will work. I raised this task to request that we outline both scenarios and the steps involved for making destructive changes in the client VS making them in the cloud/UI.&lt;/p&gt;</comment>
                            <comment id="4051913" author="ian.ward" created="Mon, 13 Sep 2021 02:49:24 +0000"  >&lt;p&gt;Yeah, the docs could be updated to say &quot;terminate sync in the backend and then re-enable it once the sync schema has been changed matches on both ends, &quot;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mansoor.omar&quot; class=&quot;user-hover&quot; rel=&quot;mansoor.omar&quot;&gt;mansoor.omar&lt;/a&gt; Is that what you are getting at? The doc:&lt;br/&gt;
&lt;a href=&quot;https://docs.mongodb.com/realm/sync/migrate-schema-partner-collection/#std-label-migrate-schema-partner-collection&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/realm/sync/migrate-schema-partner-collection/#std-label-migrate-schema-partner-collection&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Gives a very detailed walkthrough of how to make destructive schema changes in production with terminating sync (and thus data loss).&lt;/p&gt;</comment>
                            <comment id="4051758" author="JIRAUSER1257879" created="Sun, 12 Sep 2021 23:51:09 +0000"  >&lt;p&gt;To clarify further, the documentation seems to address the scenario where a destructive change is &lt;b&gt;made in the&lt;/b&gt; &lt;b&gt;Client&lt;/b&gt; (because of the error it mentions)...&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; message: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&apos;The following changes cannot be made in additive-only schema mode:\n&apos;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; +&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;- Property &apos;Task._id&apos; has been changed from &apos;int&apos; to &apos;string&apos;.&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; errorCode: &lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;1&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;...but the remediation step (of terminating sync) is given for the scenario where a destructive change is &lt;b&gt;made in the UI&lt;/b&gt; - which would be the correct one.&lt;/p&gt;</comment>
                            <comment id="4051752" author="JIRAUSER1257879" created="Sun, 12 Sep 2021 23:23:53 +0000"  >&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;If you are developing an application using Realm Sync and need to make a destructive schema change, you have two choices:&#160;&lt;a href=&quot;https://docs.mongodb.com/realm/sync/pause-or-terminate-sync/#std-label-terminating-realm-sync&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;terminate sync&lt;/a&gt;&#160;in the backend and then&#160;&lt;a href=&quot;https://docs.mongodb.com/realm/sync/get-started/#std-label-enable-sync&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;re-enable&lt;/a&gt;&#160;it from the start, or create a&#160;&lt;b&gt;&quot;partner collection&quot;&lt;/b&gt;.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;AFAIK terminating sync by itself will not help with doing a destructive change since the server schema will remain.&lt;/p&gt;

&lt;p&gt;You would need to manually remove the field or collection schema (from the UI) that the destructive change involves, then terminate sync.&#160;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ian.ward&quot; class=&quot;user-hover&quot; rel=&quot;ian.ward&quot;&gt;ian.ward&lt;/a&gt;&#160;do you agree?&lt;/p&gt;</comment>
                            <comment id="4050527" author="mohammad.hunan" created="Fri, 10 Sep 2021 18:21:22 +0000"  >&lt;p&gt;This documentation exists and is already published - &lt;a href=&quot;https://docs.mongodb.com/realm/sync/synced-schema-overview/#destructive-changes&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/realm/sync/synced-schema-overview/#destructive-changes&lt;/a&gt; and &lt;a href=&quot;https://docs.mongodb.com/realm/sync/migrate-schema-partner-collection/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/realm/sync/migrate-schema-partner-collection/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000sbfvlQAA]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 10 Sep 2021 18:21:22 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        39 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            39 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>emet.ozar@mongodb.com</customfieldvalue>
            <customfieldvalue>ian.ward@mongodb.com</customfieldvalue>
            <customfieldvalue>mansoor.omar@mongodb.com</customfieldvalue>
            <customfieldvalue>mohammad.hunan@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hyukxb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i04kdc:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hyu76f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                </customfields>
    </item>
</channel>
</rss>