Skip to content

Issue with exclude flag #3601

@VaishakVk

Description

@VaishakVk

We are thinking about moving to Altas as our migration tool. As part of it we were doing a POC to check how feasible it is to work with Atlas. We use SQLC as the main schema file and apply migrations using that. We also have few analytics table that can't be part of the main schema but are present in the same DB. We tried using exclude flag and see if we can exclude these tables from Atlas's migration. But exclude flag seems to be not working. I see there were previous issues where exlcude flag was not working as intended. Is this a known issue or is there a workaround for this

Here is my configuration

// Development environment
env "dev" {
  src = "file://db/schema.sql"
  url = "postgres://<url>?sslmode=disable"
  dev = "docker://postgres"

  // Migration-specific excludes
  migration {
    exclude = ["analytics_*"]
  }
}

I've tried both atlas schema diff and atlas schema apply and in both cases it didnot exclude the tables and was showing to delete those tables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions