Reads the catalog of the migrations' schema database (see schema_databases.jai), compares it
with the structs in schema_file, and returns the proposed SQL; or what went wrong. An empty
sql means nothing differs. Runs on a fiber, like every call that talks to the server.
- config: the server to build the migrations' schema database on.
- migrations_folder: the folder of migration
.sqlfiles. - schema_file: the path of
db/schema.jai.
diff_schema :: (
config: Config,
migrations_folder: string,
schema_file: string
) -> (Migration_Proposal, problem: string)
Reads the catalog of the migrations' schema database (see schema_databases.jai), compares it
with the structs in schema_file, and returns the proposed SQL; or what went wrong. An empty
sql means nothing differs. Runs on a fiber, like every call that talks to the server.
Parameters
- config: Config
- the server to build the migrations' schema database on.
- migrations_folder: string
- the folder of migration
.sqlfiles. - schema_file: string
- the path of
db/schema.jai.
Returns
- problem: string