tern 3.1.4

Embedded database migrations in SQL or Rust.
Documentation
extend = [
    { path = "examples/examples.toml" },
]

[config]
default_to_workspace = false
skip_core_tasks = true
init_task = "init"
end_task = "end"

[env]
POSTGRES_URL = "postgres://tern:password@localhost:5433/tern"
MYSQL_URL = "mysql://tern:password@localhost:3307/tern"

[tasks.init]

[tasks.default]
alias = "check"

[tasks.lint]
dependencies = ["fmt", "clippy"]

[tasks.clippy]
command = "cargo"
args = ["clippy", "--workspace", "--all-features", "--", "-Dwarnings"]

[tasks.fmt]
command = "cargo"
args = ["fmt", "--all", "--check"]

[tasks.doc]
command = "cargo"
args = ["doc", "--workspace", "--all-features", "--no-deps"]

[tasks.readme]
command = "cargo"
args = ["rdme", "--force", "-w", "tern", "--intralinks-strip-links"]

[tasks.pgenv]
command = "docker"
args = ["compose", "up", "--wait", "postgres"]

[tasks.mysqlenv]
command = "docker"
args = ["compose", "up", "--wait", "mysql"]

[tasks.run-example]
dependencies = ["pgenv"]
env = { env_set = ["DATABASE_URL", "PACKAGE"] }
command = "cargo"
args = ["r", "-p", "${PACKAGE}", "--", "migrate", "apply-all"]

[tasks.run-pgexample]
env = { DATABASE_URL = "${POSTGRES_URL}", env_set = ["PACKAGE"] }
run_task = "run_example"

[tasks.end]
alias = "fmt"