diff --git a/atlasaction/action.go b/atlasaction/action.go index 940234f4..ee3619fd 100644 --- a/atlasaction/action.go +++ b/atlasaction/action.go @@ -232,6 +232,7 @@ func (a *Actions) MigrateApply(ctx context.Context) error { DirURL: a.GetInput("dir"), URL: a.GetInput("url"), DryRun: a.GetBoolInput("dry-run"), + RevisionsSchema: a.GetInput("revisions-schema"), TxMode: a.GetInput("tx-mode"), // Hidden param. BaselineVersion: a.GetInput("baseline"), // Hidden param. } @@ -272,16 +273,17 @@ const ( // MigrateDown runs the GitHub Action for "ariga/atlas-action/migrate/down". func (a *Actions) MigrateDown(ctx context.Context) (err error) { params := &atlasexec.MigrateDownParams{ - ConfigURL: a.GetInput("config"), - Env: a.GetInput("env"), - Vars: a.GetVarsInput("vars"), - Context: a.DeployRunContext(), - DevURL: a.GetInput("dev-url"), - URL: a.GetInput("url"), - DirURL: a.GetInput("dir"), - ToVersion: a.GetInput("to-version"), - ToTag: a.GetInput("to-tag"), - Amount: a.GetUin64Input("amount"), + ConfigURL: a.GetInput("config"), + Env: a.GetInput("env"), + Vars: a.GetVarsInput("vars"), + Context: a.DeployRunContext(), + DevURL: a.GetInput("dev-url"), + URL: a.GetInput("url"), + DirURL: a.GetInput("dir"), + ToVersion: a.GetInput("to-version"), + ToTag: a.GetInput("to-tag"), + Amount: a.GetUin64Input("amount"), + RevisionsSchema: a.GetInput("revisions-schema"), } // Based on the retry configuration values, retry the action if there is an error. var ( @@ -454,12 +456,13 @@ func (a *Actions) MigrateLint(ctx context.Context) error { // MigrateTest runs the GitHub Action for "ariga/atlas-action/migrate/test" func (a *Actions) MigrateTest(ctx context.Context) error { result, err := a.Atlas.MigrateTest(ctx, &atlasexec.MigrateTestParams{ - DirURL: a.GetInput("dir"), - DevURL: a.GetInput("dev-url"), - Run: a.GetInput("run"), - ConfigURL: a.GetInput("config"), - Env: a.GetInput("env"), - Vars: a.GetVarsInput("vars"), + DirURL: a.GetInput("dir"), + DevURL: a.GetInput("dev-url"), + Run: a.GetInput("run"), + ConfigURL: a.GetInput("config"), + Env: a.GetInput("env"), + Vars: a.GetVarsInput("vars"), + RevisionsSchema: a.GetInput("revisions-schema"), }) if err != nil { return fmt.Errorf("`atlas migrate test` completed with errors:\n%s", err) diff --git a/migrate/apply/action.yml b/migrate/apply/action.yml index da36bff3..0d938f0e 100644 --- a/migrate/apply/action.yml +++ b/migrate/apply/action.yml @@ -32,6 +32,9 @@ inputs: dry-run: description: Print SQL without executing it. Either "true" or "false". required: false + revisions-schema: + description: The name of the schema containing the revisions table. + required: false outputs: current: description: The current version of the database. (before applying migrations) diff --git a/migrate/down/action.yml b/migrate/down/action.yml index 332bd586..5393b4d7 100644 --- a/migrate/down/action.yml +++ b/migrate/down/action.yml @@ -49,6 +49,9 @@ inputs: wait-timeout: description: Time after which no other retry attempt is made and the action exits. required: false + revisions-schema: + description: The name of the schema containing the revisions table. + required: false outputs: current: description: The current version of the database. (before applying migrations) diff --git a/migrate/test/action.yml b/migrate/test/action.yml index df1b40e8..36df0871 100644 --- a/migrate/test/action.yml +++ b/migrate/test/action.yml @@ -36,6 +36,9 @@ inputs: Filter tests to run by regexp. For example, `^test_.*` will only run tests that start with `test_`. Default is to run all tests. required: false + revisions-schema: + description: The name of the schema containing the revisions table. + required: false runs: using: node20 main: index.js