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
docs: remove empty example migrations/plan.yaml (#2969)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Refactors the OLAP apply-migrations doc for clarity—proper
bulleting/line breaks, clearer callouts, and removal of an empty example
`plan.yaml` block.
>
> - **Docs (OLAP Apply Migrations)**:
> - Reformat "How to think about it" into proper bullets and line breaks
for readability.
> - Clarify callout text and split long paragraphs into shorter lines.
> - Remove empty fenced `yaml` example for `migrations/plan.yaml`.
> - Tweak wording for plan review/application to be clearer without
changing meaning.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6f5f768. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Copy file name to clipboardExpand all lines: apps/framework-docs/src/pages/moose/olap/apply-migrations.mdx
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,10 @@ Migrations are designed for two complementary goals:
23
23
- Be deliberate in production by executing a reviewed, versioned plan that matches your intent and protects data.
24
24
25
25
How to think about it:
26
-
- Development mode: You edit code, MooseStack infers the SQL and immediately applies it to local ClickHouse. Great for rapid iteration; not guaranteed to infer intent (e.g., renames).
27
-
- Production (planned) mode: You generate a plan from the target environment vs your code, review and commit the plan, and MooseStack executes it deterministically during deploy with drift checks.
26
+
- Development mode: You edit code, MooseStack infers the SQL and immediately applies it to local ClickHouse.
27
+
Great for rapid iteration; not guaranteed to infer intent (e.g., renames).
28
+
- Production (planned) mode: You generate a plan from the target environment vs your code, review and commit the plan, and
29
+
MooseStack executes it deterministically during deploy with drift checks.
28
30
29
31
What you need to do:
30
32
- In dev: just code. MooseStack handles local diffs automatically.
@@ -117,20 +119,21 @@ This generates a few files in the `migrations` directory:
117
119
-`local_infra_map.json`: A snapshot of the local database state at the time the plan was generated
118
120
119
121
<Callouttype="info"title="Why store the remote and local state?"compact>
120
-
The remote and local state are used to validate that the plan is still valid at the time of deployment. If there have been schema changes made to your live remote database since the plan was generated, the deployment will abort and you will need to regenerate the plan. This is to prevent you from dropping data unintentionally.
122
+
The remote and local state are used to validate that the plan is still valid at the time of deployment.
123
+
If there have been schema changes made to your live remote database since the plan was generated,
124
+
the deployment will abort and you will need to regenerate the plan. This is to prevent you from dropping data unintentionally.
121
125
</Callout>
122
126
123
127
### Reviewing and Editing the Plan
124
128
125
-
You can review and edit the plan as needed. The plan is a YAML file that contains an ordered list of operations to apply to the remote database to bring it into alignment with your local code.
126
-
127
-
```yaml filename="migrations/plan.yaml" copy
128
-
129
-
```
129
+
You can review and edit the plan as needed.
130
+
The plan is a YAML file that contains an ordered list of operations to apply to the remote database to bring it into alignment with your local code.
130
131
131
132
### Applying the Plan
132
133
133
-
The plan is applied during deployment. MooseStack will validate that the remote database state matches the snapshot of the database state at the time the plan was generated, and applies `plan.yaml` in order; it aborts if snapshots don’t match current state.
134
+
The plan is applied during deployment.
135
+
MooseStack will validate that the remote database state matches the snapshot of the database state
136
+
at the time the plan was generated, and applies `plan.yaml` in order; it aborts if snapshots don’t match current state.
0 commit comments