Actions
Defect #20176
closedDefect on user table migrate code
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Invalid
Affected version:
Description
There´s a problem with the definitions of the column language of the table users.
The limit of the column size is set to 2, but when you using brazilian portuguese the
language acronym contains 5 letters, 'pt-BR' or 'pt-br'.
Then when i try to run bundle exec rake db:migrate an exception pops on the window.
A don´t know if this bug exists in another version or affects another language, but i almost break my head trying to find the solution.
create_table "users", :force => true do |t| t.column "login", :string, :limit => 30, :default => "", :null => false t.column "hashed_password", :string, :limit => 40, :default => "", :null => false t.column "firstname", :string, :limit => 30, :default => "", :null => false t.column "lastname", :string, :limit => 30, :default => "", :null => false t.column "mail", :string, :limit => 60, :default => "", :null => false t.column "mail_notification", :boolean, :default => true, :null => false t.column "admin", :boolean, :default => false, :null => false t.column "status", :integer, :default => 1, :null => false t.column "last_login_on", :datetime t.column "language", :string, :limit => 2, :default => "" t.column "auth_source_id", :integer t.column "created_on", :timestamp t.column "updated_on", :timestamp end
Solution¶
change to 5 the limit of the column language
t.column "language", :string, :limit => 5, :default => ""
Related issues
Actions