Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

atlasexec: remove deprecated funcs and types #50

Merged
merged 2 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions atlasexec/atlas.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,6 @@ type (
Vars map[string]string
)

type (
// Deprecated: MigrateApplyParams instead.
ApplyParams = MigrateApplyParams
// Deprecated: use MigrateStatusParams instead.
StatusParams = MigrateStatusParams
// Deprecated: use MigrateLintParams instead.
LintParams = MigrateLintParams
)

// TriggerType values.
const (
TriggerTypeCLI TriggerType = "CLI"
Expand Down Expand Up @@ -180,24 +171,6 @@ func (t Client) WithWorkDir(dir string, fn func(*Client) error) error {
return fn(&t)
}

// Apply runs the 'migrate apply' command.
// Deprecated: use MigrateApply instead.
func (c *Client) Apply(ctx context.Context, params *MigrateApplyParams) (*MigrateApply, error) {
return c.MigrateApply(ctx, params)
}

// Lint runs the 'migrate lint' command.
// Deprecated: use MigrateLint instead.
func (c *Client) Lint(ctx context.Context, params *MigrateLintParams) (*SummaryReport, error) {
return c.MigrateLint(ctx, params)
}

// Status runs the 'migrate status' command.
// Deprecated: use MigrateStatus instead.
func (c *Client) Status(ctx context.Context, params *MigrateStatusParams) (*MigrateStatus, error) {
return c.MigrateStatus(ctx, params)
}

// Login runs the 'login' command.
func (c *Client) Login(ctx context.Context, params *LoginParams) error {
if params.Token == "" {
Expand Down
7 changes: 0 additions & 7 deletions atlasexec/atlas_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,6 @@ func (e *MigrateApplyError) Error() string { return e.MigrateApply.Error }
// Error implements the error interface.
func (e *SchemaApplyError) Error() string { return e.SchemaApply.Error }

type (
// Deprecated: use MigrateStatus instead
StatusReport = MigrateStatus
// Deprecated: use MigrateApply instead
ApplyReport = MigrateApply
)

// DiagnosticsCount returns the total number of diagnostics in the report.
func (r *SummaryReport) DiagnosticsCount() int {
var n int
Expand Down
4 changes: 2 additions & 2 deletions atlasexec/internal/e2e/sqlite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func Test_SQLite(t *testing.T) {
runTestWithVersions(t, []string{"latest"}, "versioned-basic", func(t *testing.T, ver *atlasexec.Version, c *atlasexec.Client) {
url := "sqlite://file.db?_fk=1"
ctx := context.Background()
s, err := c.Status(ctx, &atlasexec.MigrateStatusParams{
s, err := c.MigrateStatus(ctx, &atlasexec.MigrateStatusParams{
URL: url,
Env: "local",
})
Expand Down Expand Up @@ -47,7 +47,7 @@ func Test_PostgreSQL(t *testing.T) {
runTestWithVersions(t, []string{"latest"}, "versioned-basic", func(t *testing.T, ver *atlasexec.Version, c *atlasexec.Client) {
url := u
ctx := context.Background()
s, err := c.Status(ctx, &atlasexec.MigrateStatusParams{
s, err := c.MigrateStatus(ctx, &atlasexec.MigrateStatusParams{
URL: url,
Env: "local",
})
Expand Down