dbschema 0.1.1

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
type "address" {
  field "street" { type = "text" }
  field "zip" { type = "int" }
}

test "address_type" {
  assert = [
    "SELECT ROW('road',12345)::address IS NOT NULL"
  ]
  assert_fail = [
    "SELECT ROW('main', 'not-a-number')::address"
  ]
}