Postgres module

check_schema

procedure · 1 overloadsince 0.27.0Source

Stops the compile when file (the generated schema) was made from other migrations than the ones in the project now. Needs no server: it compares hashes of db/migrations/*.sql.

check_schema :: (file: string, location := #caller_location)

Stops the compile when file (the generated schema) was made from other migrations than the ones in the project now. Needs no server: it compares hashes of db/migrations/*.sql.

Parameters

file: string
the generated schema file.
location := #caller_location
where the call is written, used to point a problem at it. Leave the default.

See also