Closed ychiucco closed 1 month ago
This PR does not seem to contain any modification to coverable code.
dropdb fractal_test
createdb fractal_test
psql -U postgres -h localhost -d fractal_test -f tests/data/testing_databases/clean_db_fractal_2.4.0.sql
poetry run fractalctl set-db
echo -e "yes\nyes\nyes\nyes\nyes"| poetry run fractalctl update-db-data
**WARNING**
This command acts directly on database data. If you have any doubt about this, do not run it!
Expected use case:
You have updated fractal-server from some old version to a target version, and now need to fix some database data.
The detected target version is '2.6.0' (corresponding to the update-db-data module '2_6_0.py').
Note that the old and target versions MUST be consecutive, that is, you cannot skip an intermediate version.
The list of released versions is available at https://github.com/fractal-analytics-platform/fractal-server/blob/main/CHANGELOG.md.
Do you confirm that the old and target versions are consecutive? (yes/no)
Do you confirm that the target version is 2.6.0? (yes/no)
Have you run 'fractalctl set-db' with the target version? (yes/no)
Have you made a backup of your database (e.g. via `pg_dump`)? (yes/no)
Are you sure you want to proceed? (yes/no)
OK, now starting data-migration script
WARNING:fix_db:START execution of fix_db function
WARNING:fix_db:START handling user 1: 'admin@example.org'
WARNING:fix_db:New user 1 settings:
ssh_host=None ssh_username=None slurm_user=None cache_dir='/tmp/__REDACTED_CACHE_DIR__' ssh_tasks_dir=None id=1 ssh_private_key_path=None ssh_jobs_dir=None slurm_accounts=[]
WARNING:fix_db:END handling user 1: 'admin@example.org'
WARNING:fix_db:START handling user 6: 'user@example.org'
WARNING:fix_db:New user 6 settings:
ssh_host=None ssh_username=None slurm_user='__REDACTED_SLURM_USER_' cache_dir='/tmp/__REDACTED_CACHE_DIR__' ssh_tasks_dir=None id=2 ssh_private_key_path=None ssh_jobs_dir=None slurm_accounts=[]
WARNING:fix_db:END handling user 6: 'user@example.org'
WARNING:fix_db:START handling user 27: 'admin@fractal.xy'
WARNING:fix_db:New user 27 settings:
ssh_host=None ssh_username=None slurm_user='slurm' cache_dir=None ssh_tasks_dir=None id=3 ssh_private_key_path=None ssh_jobs_dir=None slurm_accounts=[]
WARNING:fix_db:END handling user 27: 'admin@fractal.xy'
WARNING:fix_db:START handling user 28: 'vanilla@example.org'
WARNING:fix_db:New user 28 settings:
ssh_host=None ssh_username=None slurm_user='vanilla-slurm' cache_dir=None ssh_tasks_dir=None id=4 ssh_private_key_path=None ssh_jobs_dir=None slurm_accounts=[]
WARNING:fix_db:END handling user 28: 'vanilla@example.org'
WARNING:fix_db:END of execution of fix_db function
Checklist before merging
CHANGELOG.md
main
into the current branch.