dthonon / Client_API_VN

Export from VisioNature (Biolovision) web site to local postgresql database
GNU General Public License v3.0
3 stars 1 forks source link

Can't migrate db using alembic in production #288

Open lpofredc opened 1 year ago

lpofredc commented 1 year ago

After installation of latest release using pip install, command transfer_vn --db_migrate myfile.yml fail with following error due to missing alembic.ini file. Effectively, file is not installed while using pip and this file path is a relative path to package source code.

❯ transfer_vn --db_migrate faune-aura.yml 
2022-09-27 16:47:53,376 - INFO - transfer_vn - /home/lpoaura/.venv/client_api_vn/bin/transfer_vn, version 2.11.0
2022-09-27 16:47:53,376 - INFO - transfer_vn - Arguments: ['--db_migrate', 'faune-aura.yml']
2022-09-27 16:47:53,376 - INFO - transfer_vn - Getting configuration data from faune-aura.yml
2022-09-27 16:47:53,377 - INFO - transfer_vn.evn_conf - Loading YAML configuration faune-aura.yml
2022-09-27 16:47:53,478 - INFO - transfer_vn - Migrating database to current version
  FAILED: No config file 'src/alembic.ini' found, or file has no '[alembic]' section
2022-09-27 16:47:53,804 - ERROR - transfer_vn - Command 'alembic -x db_schema_import=src_vn_json -x db_url=postgresql://******:******@localhost/***** --config src/alembic.ini upgrade head' returned non-zero exit status 255.