Releases: aj0strow/pgschema
Releases · aj0strow/pgschema
Fix Numeric RegExp
Binary Releases
New releases will include a linux/amd64
binary.
Update PGX Version
Dependency update. pgx
now uses pgtype
instead of Null*
to allowing null columns.
Array Column Types
Array types are now supported.
column "emails" {
type = "text[]"
}
However, two caveats:
- PostgreSQL does not differentiate between arrays of different arity or dimension. Likewise
pgschema
considersinteger[]
andinteger[3][3]
the same data type. - The numeric precision, scale, and radix is included but not populated in
information_schema.element_types
sopgschema
can't tell the difference betweennumeric(3,4)[]
andnumeric(2,5)[]
. It's best to avoid numeric arrays.
Default Casted Type
Column defaults using ambiguous literals such as default ''
are converted to default ''::text
by postgres, which used to cause pgschema
to mark the column as changed. It's fixed now.
User Defined Types
User defined types are now supported, which means citext
and potentially other virtual types work with pgschema
now. It used to reset the data type each time.
Numeric and timestamp fixes.
Several bug fixes.
- Column type is now compared on alter column matches, so you can change data type.
- Column types
timestamp
andtimestamptz
are now aliases to the longer postgresql namestimestamp without time zone
andtimestamp with time zone
. It will now only update when changed instead of every run. - Numeric types are now parsed from the HCL source, loaded in the PSQL source, and compared in the column match logic.
- Program exit code is non-zero on failure.
Column validation.
Small fix to validate the column data type is set. It's easier to debug than bad SQL statements with an extra space instead of the type.
Initial release.
I'm using pgschema
in my own projects, starting now. ✌🏻