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
variable "schema" { default = "public" }

table "users" {
  schema = var.schema
  column "id" {
    type = "serial"
    nullable = false
  }
}

test "variable_schema" {
  assert = "SELECT to_regclass('public.users') IS NOT NULL"
}