Skip to content
Snippets Groups Projects

Make `swh db init` command work *properly* with the --dbname option

Merged David Douard requested to merge douardda/swh-core:db-init into master
1 unresolved thread

This allows to run the command swh db init --dname DBURI without giving a configuration file AND properly set the db version, which can be handy some times when testing.

Note that this may not work for all swh packages, when the postgresql backend for the given swh package needs more configuration entries than just the psql connection string.

This more or less drop support for "old style" db sql init scripts:

  • the swh db init will still work for an 'old style' package (in which the sql init scripts do create dbversio table and initialize it) but will display an error message,
  • the --initial-version option has been dropped, since this made sense only for old style packages,
  • the test data 'cli_new' has been renamed as 'cli' (in place of the previous "old style" one)
Edited by David Douard

Merge request reports

Approval is optional

Merged by David DouardDavid Douard 1 year ago (Jul 7, 2023 3:57pm UTC)

Merge details

  • Changes merged into generated-differential-D7930-target with b26a668e.
  • Deleted the source branch.

Pipeline #3488 passed

Pipeline passed for b26a668e on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading