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. Jul 07, 2023
    • David Douard's avatar
      b26a668e
    • David Douard's avatar
      Make `swh db init` command work properly with the --dbname option · 89d48572
      David Douard authored
      This allows to run the command `swh db init --dname DBURI` without
      giving a configuration file while still populating the dbversion table
      in the database.
      
      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 drops 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 dbversion 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)
      89d48572
Loading