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/website/adr/009-database-migration-squashing.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,17 +14,17 @@ Accepted
14
14
15
15
## Context
16
16
17
-
Many database migrations have accumulated over time for the Mithril nodes. As the migrations are done sequentially, the resulting scheme of the database is hard to understand and maintain.
17
+
Over time, many database migrations have accumulated in Mithril nodes. Since these migrations are applied sequentially, the resulting database schema has become difficult to understand and maintain.
18
18
19
19
## Decision
20
20
21
-
To mitigate these concerns, we have decided to implement a migration squashing once we have stacked too many migrations for a store: all the existing migrations are consolidated and replaced by the equivalent new migration.
21
+
To address this, the team decided to implement migration squashing once too many migrations have accumulated for a store. This process consolidates all existing migrations into a single, equivalent migration.
22
22
23
23
## Consequences
24
24
25
-
- This applies to the migrations of all the stores of the Mithril nodes
25
+
- This applies to the migrations of all Mithril node stores
26
26
- A squashed migration will be applied when a database is initialized for the first time
27
-
- A squashed migration must be optional and run only if not already applied previously with the equivalent migration sequence
28
-
- Some nodes may have only partially applied the equivalent sequence of migrations and thus can not apply the squashed migration right away:
29
-
- They need to first run the migration with the latest distribution that does not ship the squashed migration so that their database is ready to play the squashed migration
30
-
- This distribution is associated to a squashed migration to provide a smooth user experience.
27
+
- A squashed migration must be optional and should only run if it has not been previously applied with the equivalent migration sequence
28
+
- Some nodes may have only partially applied the equivalent sequence of migrations and cannot apply the squashed migration immediately:
29
+
- They must first run the migration using the latest distribution that does not include the squashed migration, ensuring their database is prepared to apply it
30
+
- This distribution is associated with a squashed migration to provide a smooth user experience.
0 commit comments