Libki / libki-server

Libki Server
Other
55 stars 28 forks source link

script/development/update_schema.sh shows diff warning for identical schema #311

Closed jfmartinezm closed 1 year ago

jfmartinezm commented 1 year ago

Describe the bug When running script/development/update_schema.sh, a diff warning is shown even if the schema has not been modified:

 exists "/app/script/../lib/Libki/Model"
 exists "/app/script/../t"
Dumping manual schema for Libki::Schema::DB to directory /app/script/../lib ...
Schema dump completed.
 exists "/app/script/../lib/Libki/Model/DB.pm"
created "/app/script/../lib/Libki/Model/DB.pm.new"
 exists "/app/script/../t/model_DB.t"
TIME ZONE IS Europe/Madrid

Installing version 3.0.0

Running script initial-database-setup.sql

Installing version 3.0.1

Running script print-jobs-copies.sql

Installing version 3.0.2

Running script add-fields-for-reservation.sql

Installing version 3.0.3

Running script client-type.sql

Installing version 3.0.4

Running script print

Installing version 3.0.4

Running script restore-reservations-fk.sql

Installing version 3.0.5

Running script add-field-troublemaker-until.sql

Installing version 3.0.5

Running script remove-guest-pass-file-setting.sql

Installing version 4.0.1

Running script remove-guest-pass-file-setting.sql

Installing version 4.0.2

Running script add-field-status-for-clients.sql

Installing version 4.0.3

Running script add-field-creation

Installing version 4.0.4

Running script create-minutes-allotment-table.sql

Installing version 4.0.5

Running script add

Installing version 4.0.6

Running script convert

Installing version 4.0.7

Running script add

Installing version 4.0.8

Running script update

Installing version 4.0.9

Running script add

Installing version 4.1.0

Running script add

Installing version 4.1.1

Running script issue
WARNING: The schema from a fresh install does not match the current schema. Did you forget to add a database update?

To Reproduce

  1. Execute script/development/update_schema.sh
  2. Check its output for the line "WARNING..."

Expected behavior The script updates the schema with no warning.

Deployment architecture:

Additional context To run update_schema.sh from inside the debian container, mariadb-client had to be manually installed with install_packages mariadb-client.