metaschema
metaschema copied to clipboard
Checking that the length property is not assigned to type number
Description
By analogy with the string
type being converted to varchar
, I wanted to limit the length of the number
. After the command metasql c
, a type integer(<precision>)
was generated in the database.sql
file, using which will result in an error when attempting to migrate.
Solution
I suggest adding a check that the property length
is not used in relation to the type number
.
Alternatives
You can also use numeric(<precision>)
when generating sql.
Additional context Driver: Postgres.