update Ruby gems: some of these are security updates. Additionally, the dependency to Ransack 4.0 was missing in commit 87721f7 inside Gemfile.lock, causing 500 when viewing Admin Interface model views.
Older fixes up to 0.4.2 (already merged into main):
Fix role relation for 'users' test fixture: the role attribute is a DB relation and needs to be used as such also in the test fixture.
DB migrations: make the seed data idempotent, i.e. don't rely on previously applied data from a migration.
Explanation:
A call to rails db:prepare will not actually run the migrations but instead uses rake db:schema_load directly, so that none of the migrations are run. In the case that data migrations are done via normal migrations, these are left out via db:prepare as well. If one wants to make sure, that all migrations are run, one needs to explicitly call rake db:migrate db:seed. Also move the data migration for roles out of the migration itself into seeds.rb.
Enable admin interface by default inside .env.example
Fix Rails Conversation Tests for missing Rasa model button scenario
Activate Masdif Tests in CI: Start all containers and run rails tests inside the Masdif container
Bump activeadmin to 3.0.0, fix compatibility issues
add rake task to add admin user:
For installations, where the new admin interface hasn't been introduced and
that already have a DB in place and therefore cannot run rake db:seed,
we add a rake task to add an admin user explicitely.
The rake task is executed via:
rake admin:add["admin-user", "admin-password"]
or
rake admin:add
In the latter case, environment variables ADMIN_USER, ADMIN_PASSWORD are
used.
conversation_controller.rb: don't use to_json when saving to jsonb columns, otherwise the object will be serialized to a string instead of a json object
app/models/message.rb: generalize what to show for Nothing
Older fixes up to 0.4.2 (already merged into main):
Explanation: A call to rails
db:prepare
will not actually run the migrations but instead usesrake db:schema_load
directly, so that none of the migrations are run. In the case that data migrations are done via normal migrations, these are left out viadb:prepare
as well. If one wants to make sure, that all migrations are run, one needs to explicitly callrake db:migrate db:seed
. Also move the data migration for roles out of the migration itself intoseeds.rb
.add rake task to add admin user: For installations, where the new admin interface hasn't been introduced and that already have a DB in place and therefore cannot run rake db:seed, we add a rake task to add an admin user explicitely.
The rake task is executed via:
rake admin:add["admin-user", "admin-password"]
or
rake admin:add
In the latter case, environment variables ADMIN_USER, ADMIN_PASSWORD are used.
to_json
when saving to jsonb columns, otherwise the object will be serialized to a string instead of a json object