data "external_schema" "gorm" {
  program = [
    "go",
    "run",
    "-mod=mod",
    ".",
  ]
}

env "gorm" {
  src = data.external_schema.gorm.url
  dev = "" // dsn db to check the diff
  migration {
    dir = "file://migrations"
  }
  url = "" // dsn db to apply
  format {
    migrate {
      diff = "{{ sql . \"  \" }}"
    }
  }
}