TenantMigrationMarkerService
in package
implements
TenantMigrationMarkerServiceInterface
Records a pre-migration recovery marker and tags an on-demand logical backup.
Table of Contents
Interfaces
Constants
- JOB_TYPE : mixed = 'tenant_migration_marker'
Properties
- $platformConnection : Connection
- $tenantBackupService : TenantBackupService
Methods
- __construct() : mixed
- Constructor.
- createMarker() : TenantMigrationMarkerResult
- Create a required pre-migration recovery marker before tenant DDL runs.
- baseMetadata() : array<string, mixed>
- insertMarkerJob() : void
- retentionDays() : int
- tag() : string
- tagBackupJob() : void
- Tag the backup job so operators can identify the rollback target.
- targetSchema() : string
Constants
JOB_TYPE
private
mixed
JOB_TYPE
= 'tenant_migration_marker'
Properties
$platformConnection read-only
private
Connection
$platformConnection
$tenantBackupService read-only
private
TenantBackupService
$tenantBackupService
Methods
__construct()
Constructor.
public
__construct(Connection $platformConnection, TenantBackupService $tenantBackupService) : mixed
Parameters
- $platformConnection : Connection
- $tenantBackupService : TenantBackupService
createMarker()
Create a required pre-migration recovery marker before tenant DDL runs.
public
createMarker(TenantMetadata $tenant, array<string|int, mixed> $options, string $migrationJobId) : TenantMigrationMarkerResult
Parameters
- $tenant : TenantMetadata
- $options : array<string|int, mixed>
-
Tenant migration options
- $migrationJobId : string
Tags
Return values
TenantMigrationMarkerResultbaseMetadata()
private
baseMetadata(TenantMetadata $tenant, array<string, mixed> $options, string $migrationJobId, string $tag, DateTime $now) : array<string, mixed>
Parameters
- $tenant : TenantMetadata
- $options : array<string, mixed>
- $migrationJobId : string
- $tag : string
- $now : DateTime
Return values
array<string, mixed>insertMarkerJob()
private
insertMarkerJob(string $markerJobId, TenantMetadata $tenant, array<string, mixed> $metadata, DateTime $now) : void
Parameters
- $markerJobId : string
- $tenant : TenantMetadata
- $metadata : array<string, mixed>
- $now : DateTime
retentionDays()
private
retentionDays(array<string, mixed> $options) : int
Parameters
- $options : array<string, mixed>
Return values
inttag()
private
tag(array<string, mixed> $options) : string
Parameters
- $options : array<string, mixed>
Return values
stringtagBackupJob()
Tag the backup job so operators can identify the rollback target.
private
tagBackupJob(string $backupJobId, string $tag, string $migrationJobId, string $markerJobId) : void
Parameters
- $backupJobId : string
- $tag : string
- $migrationJobId : string
- $markerJobId : string
targetSchema()
private
targetSchema(array<string, mixed> $options) : string
Parameters
- $options : array<string, mixed>