You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/resources/coming-from-mongock.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ sidebar_position: 999
4
4
---
5
5
import Tabs from '@theme/Tabs';
6
6
import TabItem from '@theme/TabItem';
7
+
import VersionBadge from '@site/src/components/VersionBadge';
7
8
8
9
# Coming from Mongock
9
10
@@ -105,6 +106,38 @@ A full explanation of why this is required (and how Mongock’s model differs fr
105
106
106
107
**That’s all you need to activate Mongock support.** From there, Flamingock handles the detection of legacy changes, audit import, and stage ordering automatically.
The `@MongockSupport` annotation includes optional fields you can use to configure how Flamingock reads Mongock’s audit log. Both fields accept **literal values** or **property placeholders**.
112
+
113
+
| Name | Type | Default | Description |
114
+
| --- | --- | --- | --- |
115
+
|`origin`|`String`| "" | The Mongock audit origin to read from. Supports literal values and placeholders. When empty (default), Flamingock uses Mongock’s default origin value. |
116
+
|`emptyOriginAllowed`|`String`| "" | Whether Flamingock should allow an empty origin during import. Supports literal values and placeholders. Allowed values are `true`, `false`, or empty. When empty (default), it is treated as `false`, and Flamingock will fail if the origin is empty. |
117
+
118
+
:::info
119
+
`origin` value by Mongock driver:
120
+
121
+
-**MongoDB**: collection name.
122
+
-**DynamoDB**: table name.
123
+
-**Couchbase**: either the collection name (implicit `_default` scope) or `{scope}.{collection}` (for example, `"myscope.mycollection"`).
124
+
:::
125
+
126
+
Example:
127
+
128
+
```java
129
+
@MongockSupport(
130
+
targetSystem="mongodb-target-system",
131
+
origin="customChangeLog",
132
+
emptyOriginAllowed="true"
133
+
)
134
+
publicclassApplication { }
135
+
```
136
+
137
+
:::tip Property placeholders
138
+
Configuration values can be set by referencing properties in the Flamingock context using the format `${my.custom.property:defaultValue}`.
139
+
:::
140
+
108
141
## Understanding the target system for Mongock migrations
109
142
110
143
Mongock and Flamingock follow different models when interacting with external systems, so it is important to understand how the `targetSystem` defined in `@MongockSupport` fits into a Flamingock application.
0 commit comments