Fixed issue #650 - Unable to process emails with email addresses longer then 140 signs.

This commit is contained in:
Martin Edenhofer 2017-01-19 15:52:10 +01:00
parent 24d8b79503
commit 91063252a0
2 changed files with 12 additions and 2 deletions

View file

@ -16,10 +16,10 @@ class CreateBase < ActiveRecord::Migration
create_table :users do |t| create_table :users do |t|
t.references :organization, null: true t.references :organization, null: true
t.string :login, limit: 100, null: false t.string :login, limit: 255, null: false
t.string :firstname, limit: 100, null: true, default: '' t.string :firstname, limit: 100, null: true, default: ''
t.string :lastname, limit: 100, null: true, default: '' t.string :lastname, limit: 100, null: true, default: ''
t.string :email, limit: 140, null: true, default: '' t.string :email, limit: 255, null: true, default: ''
t.string :image, limit: 100, null: true t.string :image, limit: 100, null: true
t.string :image_source, limit: 200, null: true t.string :image_source, limit: 200, null: true
t.string :web, limit: 100, null: true, default: '' t.string :web, limit: 100, null: true, default: ''

View file

@ -0,0 +1,10 @@
class LoginEmailLength650 < ActiveRecord::Migration
def up
# return if it's a new setup
return if !Setting.find_by(name: 'system_init_done')
change_column(:users, :login, :string, limit: 255)
change_column(:users, :email, :string, limit: 255)
end
end