dbschema 0.1.0

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
14
enum "status" {
  schema = "public"
  values = ["active", "disabled"]
}

test "status_enum" {
  assert = [
    "SELECT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'status')",
    "SELECT 'active'::status IS NOT NULL"
  ]
  assert_fail = [
    "SELECT 'unknown'::status"
  ]
}