dbschema 0.1.2

Define database schema's as HCL files, and generate idempotent SQL migrations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
table "orders" {
  column "region" { type = "text" }
  column "product" { type = "text" }
  primary_key { columns = ["region", "product"] }
}

statistics "orders_stats" {
  schema = "public"
  table  = "orders"
  columns = ["region", "product"]
  kinds   = ["ndistinct", "dependencies"]
  comment = "Multi-column statistics for orders"
}