docs: document migrations on Cloud (#13785)

This commit is contained in:
Shahed Nasser
2025-10-20 19:24:30 +03:00
committed by GitHub
parent 150aa50397
commit 20bfdac06d
2 changed files with 16 additions and 2 deletions

View File

@@ -99,4 +99,18 @@ By default, when Medusa creates a [preview environment](../environments/preview/
Cloud also allows you to configure which environment's database to replicate the preview database from. For example, you can replicate the Staging environment's database instead of Production.
Learn more in the [Preview Environments](../environments/preview/page.mdx#manage-shared-previews-settings) guide.
Learn more in the [Preview Environments](../environments/preview/page.mdx#manage-shared-previews-settings) guide.
---
## Running Migrations on Cloud
Medusa automatically runs database migrations for every deployment on Cloud. This ensures that your database schema is always up-to-date with the latest changes in your Medusa application.
When you deploy changes to an environment on Cloud, Medusa:
1. Runs any [pending database migrations](!docs!/learn/fundamentals/data-models/write-migration).
2. [Syncs links](!docs!/learn/fundamentals/module-links).
3. [Runs pending data migration scripts](!docs!/learn/fundamentals/data-models/write-migration#data-migration-scripts).
So, if you define new database migrations in your module, define new links, or add data migration scripts, Medusa will apply those changes automatically when you deploy the changes to Cloud.

View File

@@ -6,7 +6,7 @@ export const generatedEditDates = {
"app/deployments/page.mdx": "2025-10-17T14:40:07.793Z",
"app/organizations/page.mdx": "2025-10-02T11:31:07.315Z",
"app/notifications/page.mdx": "2025-10-15T15:25:33.672Z",
"app/database/page.mdx": "2025-10-15T15:20:06.292Z",
"app/database/page.mdx": "2025-10-20T15:47:46.364Z",
"app/redis/page.mdx": "2025-10-15T15:22:34.997Z",
"app/s3/page.mdx": "2025-10-15T15:23:02.835Z",
"app/loyalty-plugin/page.mdx": "2025-10-15T15:27:40.303Z",