metaschema icon indicating copy to clipboard operation
metaschema copied to clipboard

Checking that the length property is not assigned to type number

Open niusia-ua opened this issue 2 years ago • 0 comments

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.

niusia-ua avatar Jan 05 '23 15:01 niusia-ua