Project

General

Profile

Installing plugin eyemine on 2.3.3

Added by Ivan Rapekas over 10 years ago

Hello all.

I am a beginner and I discover Redmine.

Problem:

I have tried to install Eyemine plugin http://www.redmine.org/plugins/eyemine into my Redmine 2.3.3 with postgresql 9.3.1, apache with passeneger on 32bit CentOS 6.4. When I did a migration I caught an exception.

Log:

[root@foo www]# ./update.sh
Stopping httpd: [ OK ]

** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:plugins:migrate
@Migrating clipboard_image_paste (Clipboard image paste)...
Migrating default_roles (Default Roles plugin)...
Migrating eyemine (Eyemine plugin)... == AppendUserFields: migrating ===============================================
-- add_column(:users, :os, :string, {:limit=>20})
> 0.2029s
-
add_column(:users, :udid, :string, {:limit=>50})
> 0.0011s
-
add_column(:users, :mobile_key, :string, {:limit=>255})
> 0.0009s
-
add_column(:users, :mobile_status, :tinyint, {:default=>0})
rake aborted!
An error has occurred, this and all later migrations canceled:@

PG::UndefinedObject: ERROR: type "tinyint" does not exist
LINE 1: ALTER TABLE "users" ADD COLUMN "mobile_status" tinyint DEFAU...

^

: ALTER TABLE "users" ADD COLUMN "mobile_status" tinyint DEFAULT 0/usr/local/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:650:in `exec'
...
and so on
...
/usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/usr/local/lib/ruby/gems/2.0.0/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
Tasks: TOP => redmine:plugins:migrate
Starting httpd: [ OK ]
[root@foo www]#

Cause:
Possibly PostgreSQL does not support type "tinyint" (it seems that tinyint is from another SQL database).

Solution:
I found that first a database object 'domain tinyint' should be created. It will be recognizable to installer as a tinyint type.

create domain tinyint as smallint constraint con_byte check (value>=0 and value<= 255);

I used pgadmin utility connected as an schema owner to run this code. After that migration was done successfully and this plugin seems to be worked. It has appeared on admin page and allows to change settings. That is all I have done at this moment.

I hope this article will help somebody to install Eyemine into his Redmine.

Thanks to Russian guy Nick Gazaloff who kindly helped to find a solution.

Reference (russian):

http://www.sql.ru/forum/actualutils.aspx?action=gotomsg&tid=469583&msg=4615082

Best regards
Ivan