Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Added sections to the db migrations document
Browse files Browse the repository at this point in the history
  • Loading branch information
hikalkan committed Dec 22, 2023
1 parent 79063d8 commit 116fde5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions en/studio/solution-templates/microservice/database-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,25 @@ As explained in the previous section, the migration system automatically creates

As explained before, the migration system re-tries a maximum of 3 times on failures by waiting a random duration between 5 and 15 seconds. You can set `MinValueToWaitOnFailure` and `MaxValueToWaitOnFailure` as milliseconds to change these durations. Default try count can be changed by setting the `MaxEventTryCount` value.

If the maximum try count (`MaxEventTryCount`) is reached, then the re-try mechanism is stopped. In that case, the tenant database will remain old, since it couldn't be migrated. In such a case, it is expected from a system admin to understand the problem (maybe the connection string was wrong or the target database server is temporarily unreachable) and manually trigger the migration once the problem is resolved.
If the maximum try count (`MaxEventTryCount`) is reached, then the re-try mechanism is stopped. In that case, the tenant database will remain old, since it couldn't be migrated. In such a case, it is expected from a system admin to understand the problem (maybe the connection string was wrong or the target database server is temporarily unreachable) and manually trigger the migration once the problem is resolved. See the *SaaS Module: The Tenant Management UI* section for details.

### Manually Triggering the Migrations
### SaaS Module: The Tenant Management UI

You may need to manually trigger database migrations for a specific tenant if the automatic migrations fails or you need to migrate (or create) tenant databases for some other reason.
SaaS module provides the necessary UI to set and change connection string for tenants and trigger the database migrations.

SaaS module provides the necessary UI to trigger the database migrations for a tenant.
#### The Connection String Management Modal

You can click to the *Database Connection Strings* command in the *Actions* dropdown button for a tenant in the *Tenants* page of the SaaS module:

![saas-module-tenant-actions](images/saas-module-tenant-actions.png)

It opens the *Database Connection Strings* modal as shown below:

![tenant-connection-string-management-modal](images/tenant-connection-string-management-modal.png)

Here, we can set a *Default* connection string for the tenant. The default connection string is used as a fallback value if you don't define a connection string for a specific microservice database.

TODO: How it created the database

## Database Configurations

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 116fde5

Please sign in to comment.