results in "annotation_backend exited with code 1"
Reasons
Insert default values before database tables are created
flask db upgrade needs the server to run.
create_app() tries to insert default values (insert_default_values) into the enum like tables
If the database is empty, these tables do not exist before the first upgrade
migration 20b00a71f4ee has error
psycopg2.errors.DatatypeMismatch: foreign key constraint "Schema_modellingLanguage_id_fkey" cannot be implemented DETAIL: Key columns "modellingLanguage_id" and "id" are of incompatible types: character varying and integer.
Solution
[x] Insert the default values directly in the migration instead of the server code
[x] Manually remove the migration 20b00a71f4ee and link Migration 511c4809eabc to 3e804134d032 (Revises)
Description
How to reproduce it
./run.sh dev -d -v
Reasons
flask db upgrade
needs the server to run.insert_default_values
) into the enum like tablesupgrade
20b00a71f4ee
has errorpsycopg2.errors.DatatypeMismatch: foreign key constraint "Schema_modellingLanguage_id_fkey" cannot be implemented DETAIL: Key columns "modellingLanguage_id" and "id" are of incompatible types: character varying and integer.
Solution
20b00a71f4ee
and link Migration511c4809eabc
to3e804134d032
(Revises)