annikoff/redmine_plugin_computed_custom_field

DB Changes not applied when migrating

gudmundurhauksson opened this issue · 9 comments

I am running on the following setup:
Environment:
Redmine version 3.4.6.stable
Ruby version 2.5.1-p57 (2018-03-29) [x86_64-linux-gnu]
Rails version 4.2.11
Environment production
Database adapter PostgreSQL

When installing, I get the following error:
ActionView::Template::Error (PG::UndefinedColumn: ERROR: column custom_fields.is_computed does not exist
And the view crashes.

Inspections on the db shows that no changes were applied. I followed the installation instructions.

When installing, I get the following error:

Please show the output of your commands.

This is the full output when running the 'rake redmine:plugins:migrate' (yes, I use sudo)

$ sudo rake redmine:plugins:migrate
(in /usr/share/redmine)
The PGconn, PGresult, and PGError constants are deprecated, and will be
removed as of version 1.0.

You should use PG::Connection, PG::Result, and PG::Error instead, respectively.

Called from /var/lib/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/dep endencies.rb:240:in `load_dependency'
Migrating computed_custom_field (Computed custom field)...
Migrating planner (Planner)...
Migrating redmine_agile (Redmine Agile plugin (PRO version))...
Migrating redmine_contacts (Redmine CRM plugin (PRO version))...
Migrating redmine_dmsf (DMSF)...
Migrating redmine_local_avatars (Redmine Local Avatars plugin)...

And then I restart apache.

Does Redmine restart too when you restart apache?

Yes. I get the plugin in the plugin list (Administration) but all Issues views crash. I can't define custom fields and can't create / edit any issues because of the error. I followed the general plugin uninstall instructions and was able to continue using my setup after that.
As described in my first post, the fields in the database are not present. I compared the scripts in the plugin's db folder to my database and nothing was applied.

Hello
I have the same problem

Environment:
  Redmine version                3.4.6.stable.
  Ruby version                   2.3.8-p459 (2018-10-18) [x86_64-linux-gnu]
  Rails version                  4.2.10
  Environment                    production
  Database adapter               PostgreSQL

Redmine plugins:
  a_common_libs                  2.4.9
  custom_menu                    1.8.5
  redmine_checklists             3.1.11
  redmine_favorite_projects      2.0.3
  redmine_people                 1.4.0
  redmineup_tags                 2.0.4
  unread_issues                  2.2.2
  usability                      2.3.8

Hm. Maybe you haven't set RAILS_ENV environment variable? Try to execute this before you run migration export RAILS_ENV=production.

Is the issue still actual?

Is the issue still actual?

I have not had to do this for other plugins but export RAILS_ENV=production worked. and the issue is resolved.

It work. Thanks for your support!