Database Migrate
Type: DEVRAMPS:DATABASE:MIGRATE
Category: database
Version: 1.0.0
Description
Run database migrations against an RDS instance.
Executes database migrations against an RDS database instance. Supports popular migration tools like Flyway, Liquibase, or custom migration scripts. The step connects securely to the database using IAM authentication or credentials from Secrets Manager.
Parameters
Required Parameters
| Parameter | Type | Description |
|---|---|---|
database_identifier | string | The RDS database identifier. |
migration_command | string | The migration command to execute. |
Optional Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
account_id | string | - | The AWS account ID where the database is located. Defaults to stage account. |
region | string | - | The AWS region. Defaults to stage region. |
migration_tool | enum: flyway | liquibase | custom | "custom" | The migration tool being used. |
timeout | integer | 30 | Migration timeout in minutes. |
environment_variables | object | - | Environment variables to set for the migration. |
Example Usage
- type: DEVRAMPS:DATABASE:MIGRATE
name: Run Database Migrations
params:
database_identifier: my-database
migration_command: flyway migrate
migration_tool: flyway
environment_variables:
FLYWAY_URL: "${{ stage.secrets.DATABASE_URL }}"
FLYWAY_USER: "${{ stage.secrets.DATABASE_USER }}"
timeout: 30