Problem
Plugin migrate seems to be failed on Redmine 4.2 environment
To Reproduce
Redmine: 4.2-stable (latest commit: b553c491)
Ruby: 2.6.10
PostgreSQL: 14.2 (via homebrew)
PostGIS: 3.2.1 (via homebrew)
% git clone git@github.com:redmine/redmine.git -b 4.2-stable redmine42
# set config/database.yml
% cd redmine42/plugins
% git clone git@github.com:gtt-project/redmine_gtt.git
% cd redmine_gtt
% yarn
% npx webpack
% cd ../../
% export GEM_RGEO_ACTIVERECORD_VERSION=6.2.2
% export GEM_ACTIVERECORD_POSTGIS_ADAPTER_VERSION=5.2.3
% bundle install
% bundle exec rake db:create
% bundle exec rake db:migrate
% bundle exec rake redmine:plugins:migrate
:
unknown OID 1829095: failed to recognize type of 'geom'. It will be treated as String.
% bundle exec rake redmine:plugins:test RAILS_ENV=test NAME=redmine_gtt
Run options: --seed 34599
# Running:
.E
Error:
UpdateProjectTest#test_should_add_default_tile_source_if_module_is_enabled:
RuntimeError: Wrapped undumpable exception for: ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "projects" does not exist
LINE 8: WHERE a.attrelid = '"projects"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"projects"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
plugins/redmine_gtt/test/unit/update_project_test.rb:9:in `block in <class:UpdateProjectTest>'
bin/rails test plugins/redmine_gtt/test/unit/update_project_test.rb:5
:
From the error messages, projects and users tables seem to be missing, and I couldn't find those tables with issues table from psql command.
% psql -U gtt redmine42_build_test
\d
=> projects, users and issues tables are missing.
Expectationprojects, users and issues tables should exist during test.
Problem Plugin migrate seems to be failed on Redmine 4.2 environment
To Reproduce
From the error messages,
projects
andusers
tables seem to be missing, and I couldn't find those tables withissues
table from psql command.=>
projects
,users
andissues
tables are missing.Expectation
projects
,users
andissues
tables should exist during test.