Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin user management #1330

Merged
merged 4 commits into from
Mar 17, 2016
Merged

Conversation

dsander
Copy link
Collaborator

@dsander dsander commented Mar 4, 2016

This adds a basic user management interface. Admins can create and edit users, additionally user accounts can be deactivated which also stops their agents from running. The deactivation works independently from the devise account locking.

Many of the devise configuration options are now accessible via the .env file.
#371
#1121

screenshot 2016-03-04 12 36 53

Thanks to kreuzwerker.de who are paying me to work on this in the context of the research project 'Digitale Kuratierungstechnologien' of which they are a part of.

ALLOW_UNCONFIRMED_ACCESS_FOR=2.days

# Duration for which the confirmation token is valid
CONFIRM_WITHIN=3.days
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.days works in the .env file?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see parse_duration :)

@cantino
Copy link
Member

cantino commented Mar 7, 2016

Awesome!

@TildeWill will appreciate this for his hosting efforts.

@TildeWill
Copy link
Contributor

I'm pretty excited, user management has always felt missing to me.

@dsander dsander force-pushed the feature/user-admin-interface branch from 322fc74 to df349a7 Compare March 14, 2016 09:08
@dsander
Copy link
Collaborator Author

dsander commented Mar 14, 2016

@TildeWill @cantino Would you mind giving it another look? I think I incorporated your feedback.

@TildeWill
Copy link
Contributor

@dsander thanks for the migration. This will be a big help!

@cantino
Copy link
Member

cantino commented Mar 16, 2016

Awesome, I'll take another look at this and your other files PR in the next couple days. (Sorry, very busy right now.)

I really appreciate all the work you're putting into these!

@dsander
Copy link
Collaborator Author

dsander commented Mar 16, 2016

@cantino No problem, family and work always comes first 😄

@@ -172,4 +172,27 @@
expect(tuples).to eq expected
end
end

context "#parse_duration" do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend adding a spec for the positive cases too.

expect(Utils.parse_duration('2.days')).to eq(2.days)
expect(Utils.parse_duration('2.seconds')).to eq(2)
expect(Utils.parse_duration('2')).to eq(2)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, done.

@cantino
Copy link
Member

cantino commented Mar 17, 2016

Awesome work!

@dsander dsander force-pushed the feature/user-admin-interface branch 2 times, most recently from 7d470bf to c2d74cd Compare March 17, 2016 09:51
@dsander dsander force-pushed the feature/user-admin-interface branch from d7fdb2c to c0c7411 Compare March 17, 2016 19:49
@dsander
Copy link
Collaborator Author

dsander commented Mar 17, 2016

Thanks for the reviews and feedback! @cantino @knu @TildeWill

dsander added a commit that referenced this pull request Mar 17, 2016
@dsander dsander merged commit bf7c2fe into huginn:master Mar 17, 2016
@dsander dsander deleted the feature/user-admin-interface branch March 17, 2016 20:02
@cantino
Copy link
Member

cantino commented Mar 17, 2016

:)
On Thu, Mar 17, 2016 at 1:02 PM Dominik Sander notifications@github.com
wrote:

Merged #1330 #1330.


You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub
#1330 (comment)

@dsander dsander mentioned this pull request Mar 19, 2016
7 tasks
@TildeWill
Copy link
Contributor

Just merged this into my fork and deployed, so awesome! I can see at a glance how people are using the site. Thanks @dsander!!!

@dsander
Copy link
Collaborator Author

dsander commented Mar 20, 2016

@TildeWill Glad you like it 😄

@thiagotalma
Copy link
Contributor

Hello guys! @cantino @dsander

This PR breaks in Heroku 😭

app[web.1]: [87f871e0-c90b-4e09-b0c4-08cdbe5ae4dd] Started GET "/" for 88.88.88.196 at 2016-03-20 11:33:43 -0300
app[web.1]: [87f871e0-c90b-4e09-b0c4-08cdbe5ae4dd] Completed 500 Internal Server Error in 34ms (ActiveRecord: 1.1ms)
app[web.1]: [87f871e0-c90b-4e09-b0c4-08cdbe5ae4dd] 
app[web.1]: Did you mean?  deactivate!):
app[web.1]:   app/models/user.rb:47:in `active?'
app[web.1]:   app/controllers/application_controller.rb:28:in `upgrade_warning'
app[web.1]:   config/initializers/silence_worker_status_logger.rb:5:in `call_with_silence_worker_status'
app[web.1]: 
heroku[router]: at=info method=GET path="/" host=myhuginn.herokuapp.com request_id=87f871e0-c90b-4e09-b0c4-08cdbe5ae4dd fwd="88.88.88.196" dyno=web.1 connect=1ms service=41ms status=500 bytes=951
heroku[router]: at=info method=GET path="/favicon.ico" host=myhuginn.herokuapp.com request_id=63cb4362-6fe1-4962-94c5-941f3d28bf99 fwd="88.88.88.196" dyno=web.1 connect=1ms service=2ms status=200 bytes=1394
app[web.1]: New threaded worker PID: 1117
app[web.1]: fatal: Not a git repository (or any parent up to mount point /app)
app[web.1]: Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
app[web.1]: fatal: Not a git repository (or any parent up to mount point /app)
app[web.1]: fatal: Not a git repository (or any parent up to mount point /app)
app[web.1]: fatal: Not a git repository (or any parent up to mount point /app)
app[web.1]: Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
app[web.1]: fatal: Not a git repository (or any parent up to mount point /app)
app[web.1]: fatal: Not a git repository (or any parent up to mount point /app)
app[web.1]: Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
app[web.1]: fatal: Not a git repository (or any parent up to mount point /app)
app[web.1]: fatal: Not a git repository (or any parent up to mount point /app)
app[web.1]: Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/postgresql_adapter.rb:637:in `prepare': PG::UndefinedColumn: ERROR:  column agents.deactivated does not exist (ActiveRecord::StatementInvalid)
app[web.1]: LINE 1: ...terStreamAgent') AND "agents"."disabled" = $1 AND "agents"."...
app[web.1]: : SELECT "agents".* FROM "agents" WHERE "agents"."type" IN ('Agents::TwitterStreamAgent') AND "agents"."disabled" = $1 AND "agents"."deactivated" = 'f'
app[web.1]:     from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/postgresql_adapter.rb:637:in `prepare_statement'
app[web.1]:     from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/postgresql_adapter.rb:585:in `execute_and_clear'
app[web.1]:     from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'
app[web.1]:     from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/abstract/database_statements.rb:355:in `select'
app[web.1]:     from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/abstract/database_statements.rb:32:in `select_all'
app[web.1]:     from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/abstract/query_cache.rb:70:in `select_all'
app[web.1]:     from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.2/lib/active_record/relation.rb:243:in `to_a'
app[web.1]:     from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.2/lib/active_record/relation/delegation.rb:132:in `method_missing'
app[web.1]:     from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.5.2/lib/active_record/relation/delegation.rb:99:in `method_missing'
app[web.1]:     from /app/lib/agent_runner.rb:89:in `each'
app[web.1]:     from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
app[web.1]:     from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
app[web.1]:     from bin/rails:8:in `require'
app[web.1]:     from bin/rails:8:in `<main>'
app[web.1]: E, [2016-03-20T11:34:15.735239 #3] ERROR -- : reaped #<Process::Status: pid 1117 exit 1> worker=unknown
git push -f heroku master                                                                                                             
Counting objects: 101, done.                                                                                                            
Delta compression using up to 4 threads.                                                                                                
Compressing objects: 100% (28/28), done.                                                                                                
Writing objects: 100% (101/101), 13.70 KiB | 0 bytes/s, done.                                                                           
Total 101 (delta 70), reused 98 (delta 67)                                                                                              
remote: Compressing source files... done.                                                                                               
remote: Building source:                                                                                                                
remote:                                                                                                                                 
remote: -----> Fetching set buildpack https://github.com/heroku/heroku-buildpack-multi.git... done                                      
remote: -----> Multipack app detected                                                                                                   
remote: =====> Downloading Buildpack: https://github.com/cantino/heroku-selectable-procfile.git                                         
remote: =====> Detected Framework: Selectable Procfile                                                                                  
remote: -----> Using deployment/heroku/Procfile.heroku as Procfile                                                                      
remote: =====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git                                               
remote: =====> Detected Framework: Ruby                                                                                                 
remote: -----> Compiling Ruby/Rails                                                                                                     
remote: -----> Using Ruby version: ruby-2.3.0                                                                                           
remote: -----> Installing dependencies using bundler 1.11.2                                                                             
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment    
remote:        fatal: Not a git repository (or any parent up to mount point /tmp)                                                       
remote:        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).                                               
remote:        fatal: Not a git repository (or any parent up to mount point /tmp)                                                       
remote:        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).                                               
remote:        Using rake 10.5.0                                                                                                        
remote:        Using i18n 0.7.0                                                                                                         
remote:        Using ace-rails-ap 2.0.1                                                                                                 
remote:        Using json 1.8.3                                                                                                         
remote:        Using minitest 5.8.4                                                                                                     
remote:        Using thread_safe 0.3.5                                                                                                  
remote:        Using builder 3.2.2                                                                                                      
remote:        Using erubis 2.7.0                                                                                                       
remote:        Using mini_portile2 2.0.0                                                                                                
remote:        Using rack 1.6.4                                                                                                         
remote:        Using mime-types 2.99.1                                                                                                  
remote:        Using arel 6.0.3                                                                                                         
remote:        Using addressable 2.3.8                                                                                                  
remote:        Using extlib 0.9.16                                                                                                      
remote:        Using multi_json 1.11.2                                                                                                  
remote:        Using bcrypt 3.1.10                                                                                                      
remote:        Using bundler 1.11.2                                                                                                     
remote:        Using thor 0.19.1                                                                                                        
remote:        Using concurrent-ruby 1.0.1                                                                                              
remote:        Using buftok 0.2.0                                                                                                       
remote:        Using coffee-script-source 1.10.0                                                                                        
remote:        Using execjs 2.6.0                                                                                                       
remote:        Using cookiejar 0.3.2                                                                                                    
remote:        Using daemons 1.1.9                                                                                                      
remote:        Using orm_adapter 0.5.0                                                                                                  
remote:        Using unf_ext 0.0.7.1                                                                                                    
remote:        Using dotenv 2.0.1 from source at `vendor/gems/dotenv-2.0.1`                                                             
remote:        Using hashie 2.0.5                                                                                                       
remote:        Using oauth 0.4.7                                                                                                        
remote:        Using eventmachine 1.0.7                                                                                                 
remote:        Using http_parser.rb 0.6.0                                                                                               
remote:        Using equalizer 0.0.11                                                                                                   
remote:        Using polyglot 0.3.5                                                                                                     
remote:        Using ffi 1.9.10                                                                                                         
remote:        Using evernote-thrift 1.25.1                                                                                             
remote:        Using multipart-post 2.0.0                                                                                               
remote:        Using hpricot 0.8.6                                                                                                      
remote:        Using simple-rss 1.3.1                                                                                                   
remote:        Using sass 3.4.14                                                                                                        
remote:        Using jwt 1.4.1                                                                                                          
remote:        Using retriable 2.0.2                                                                                                    
remote:        Using uuidtools 2.1.5                                                                                                    
remote:        Using haversine 0.3.0                                                                                                    
remote:        Using multi_xml 0.5.5                                                                                                    
remote:        Using kgio 2.9.3                                                                                                         
remote:        Using kramdown 1.3.3                                                                                                     
remote:        Using libv8 3.16.14.13                                                                                                   
remote:        Using liquid 3.0.6                                                                                                       
remote:        Using systemu 2.6.4                                                                                                      
remote:        Using mini_magick 4.2.3                                                                                                  
remote:        Using mqtt 0.3.1                                                                                                         
remote:        Using naught 1.0.0                                                                                                       
remote:        Using net-ftp-list 3.2.8                                                                                                 
remote:        Using netrc 0.10.3                                                                                                       
remote:        Using pg 0.18.3                                                                                                          
remote:        Using rails_serve_static_assets 0.0.4                                                                                    
remote:        Using rails_stdout_logging 0.0.3                                                                                         
remote:        Using raindrops 0.13.0                                                                                                   
remote:        Using ref 2.0.0                                                                                                          
remote:        Using tilt 1.4.1                                                                                                         
remote:        Using simple_oauth 0.3.1                                                                                                 
remote:        Using slack-notifier 1.0.0                                                                                               
remote:        Using string-scrub 0.0.5                                                                                                 
remote:        Using xmpp4r 0.5.6                                                                                                       
remote:        Using tzinfo 1.2.2                                                                                                       
remote:        Using memoizable 0.4.2                                                                                                   
remote:        Using nokogiri 1.6.7.2                                                                                                   
remote:        Using launchy 2.4.2                                                                                                      
remote:        Using autoparse 0.3.3                                                                                                    
remote:        Using geokit 1.8.5                                                                                                       
remote:        Using jsonpath 0.5.7                                                                                                     
remote:        Using mail 2.6.3                                                                                                         
remote:        Using rack-test 0.6.3                                                                                                    
remote:        Using warden 1.2.4                                                                                                       
remote:        Using select2-rails 3.5.9.3                                                                                              
remote:        Using unf 0.1.4                                                                                                          
remote:        Using coffee-script 2.4.1                                                                                                
remote:        Using uglifier 2.7.2                                                                                                     
remote:        Using omniauth 1.2.2                                                                                                     
remote:        Using sprockets 3.5.2                                                                                                    
remote:        Using em-socksify 0.3.0                                                                                                  
remote:        Using http 0.6.4                                                                                                         
remote:        Using treetop 1.5.3                                                                                                      
remote:        Using ethon 0.7.1                                                                                                        
remote:        Using faraday 0.9.1                                                                                                      
remote:        Using feed-normalizer 1.5.2                                                                                              
remote:        Using dotenv-rails 2.0.1 from source at `vendor/gems/dotenv-2.0.1`                                                       
remote:        Using foreman 0.63.0                                                                                                     
remote:        Using dropbox-api 0.4.2                                                                                                  
remote:        Using evernote_oauth 0.2.3                                                                                               
remote:        Using font-awesome-sass 4.3.2.1                                                                                          
remote:        Using twilio-ruby 3.11.6                                                                                                 
remote:        Using httparty 0.13.1                                                                                                    
remote:        Using macaddr 1.7.1                                                                                                      
remote:        Using rails_12factor 0.0.3                                                                                               
remote:        Using unicorn 4.9.0                                                                                                      
remote:        Using therubyracer 0.12.2                                                                                                
remote:        Using twitter-stream 0.1.15 from git://github.com/cantino/twitter-stream.git (at huginn@f7e7edb)                         
remote:        Using activesupport 4.2.5.2                                                                                              
remote:        Using rufus-scheduler 3.0.9                                                                                              
remote:        Using loofah 2.0.3                                                                                                       
remote:        Using domain_name 0.5.24                                                                                                 
remote:        Using omniauth-oauth 1.0.1                                                                                               
remote:        Using em-http-request 1.1.2                                                                                              
remote:        Using erector 0.10.0                                                                                                     
remote:        Using typhoeus 0.6.9                                                                                                     
remote:        Using faraday_middleware 0.10.0 from git://github.com/lostisland/faraday_middleware.git (at master@c5836ae)              
remote:        Using forecast_io 2.0.0                                                                                                  
remote:        Using signet 0.5.1                                                                                                       
remote:        Using oauth2 0.9.4                                                                                                       
remote:        Using twitter 5.14.0                                                                                                     
remote:        Using uuid 2.3.7                                                                                                         
remote:        Using rails-deprecated_sanitizer 1.0.3                                                                                   
remote:        Using globalid 0.3.6                                                                                                     
remote:        Using activemodel 4.2.5.2                                                                                                
remote:        Using delayed_job 4.1.1                                                                                                  
remote:        Using rails-html-sanitizer 1.0.3                                                                                         
remote:        Using http-cookie 1.0.2                                                                                                  
remote:        Using omniauth-dropbox 0.2.0                                                                                             
remote:        Using omniauth-evernote 1.2.1                                                                                            
remote:        Using omniauth-tumblr 1.1                                                                                                
remote:        Using omniauth-twitter 1.0.1                                                                                             
remote:        Using hipchat 1.2.0                                                                                                      
remote:        Using httmultiparty 0.3.10                                                                                               
remote:        Using wunderground 1.2.0                                                                                                 
remote:        Using tumblr_client 0.8.5 from git://github.com/tumblr/tumblr_client.git (at master@0c59b04)                             
remote:        Using google-api-client 0.7.1                                                                                            
remote:        Using omniauth-oauth2 1.1.2                                                                                              
remote:        Using rails-dom-testing 1.0.7                                                                                            
remote:        Using activejob 4.2.5.2                                                                                                  
remote:        Using activerecord 4.2.5.2                                                                                               
remote:        Using protected_attributes 1.0.8                                                                                         
remote:        Using rest-client 1.8.0                                                                                                  
remote:        Using hypdf 1.0.7                                                                                                        
remote:        Using omniauth-37signals 1.0.5                                                                                           
remote:        Using omniauth-wunderlist 0.0.1 from git://github.com/wunderlist/omniauth-wunderlist.git (at d0910d0@d0910d0)            
remote:        Using actionview 4.2.5.2                                                                                                 
remote:        Using delayed_job_active_record 4.1.0 from git://github.com/collectiveidea/delayed_job_active_record.git (at master@61e68
8e)                                                                                                                                     
remote:        Using ruby-growl 4.1                                                                                                     
remote:        Using rturk 2.12.1                                                                                                       
remote:        Using weibo_2 0.1.7 from git://github.com/cantino/weibo_2.git (at master@00e57d2)                                        
remote:        Using actionpack 4.2.5.2                                                                                                 
remote:        Using actionmailer 4.2.5.2                                                                                               
remote:        Using kaminari 0.16.1                                                                                                    
remote:        Using railties 4.2.5.2                                                                                                   
remote:        Using sprockets-rails 3.0.3                                                                                              
remote:        Using rails 4.2.5.2                                                                                                      
remote:        Using coffee-rails 4.1.1                                                                                                 
remote:        Using responders 2.1.1                                                                                                   
remote:        Using jquery-rails 3.1.3                                                                                                 
remote:        Using sass-rails 5.0.3                                                                                                   
remote:        Using spectrum-rails 1.3.4                                                                                               
remote:        Using bootstrap-kaminari-views 0.0.5                                                                                     
remote:        Using geokit-rails 2.0.1                                                                                                 
remote:        Using devise 3.5.4                                                                                                       
remote:        Bundle complete! 98 Gemfile dependencies, 155 gems now installed.                                                        
remote:        Gems in the groups development and test were not installed.                                                              
remote:        Bundled gems are installed into ./vendor/bundle.                                                                         
remote:        Bundle completed (0.88s)                                                                                                 
remote:        Cleaning up the bundler cache.                                                                                           
remote: -----> Preparing app for Rails asset pipeline                                                                                   
remote:        Running: rake assets:precompile                                                                                          
remote:        fatal: Not a git repository (or any parent up to mount point /tmp)                                                       
remote:        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).                                               
remote:        fatal: Not a git repository (or any parent up to mount point /tmp)                                                       
remote:        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).                                               
remote:        fatal: Not a git repository (or any parent up to mount point /tmp)                                                       
remote:        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).                                               
remote:        fatal: Not a git repository (or any parent up to mount point /tmp)                                                       
remote:        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).                                               
remote:        Asset precompilation completed (4.16s)                                                                                   
remote:        Cleaning assets                                                                                                          
remote:        Running: rake assets:clean                                                                                               
remote:        fatal: Not a git repository (or any parent up to mount point /tmp)                                                       
remote:        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).                                               
remote:        fatal: Not a git repository (or any parent up to mount point /tmp)                                                       
remote:        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).                                               
remote:        fatal: Not a git repository (or any parent up to mount point /tmp)                                                       
remote:        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).                                               
remote:        fatal: Not a git repository (or any parent up to mount point /tmp)                                                       
remote:        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).                                               
remote:                                                                                                                                 
remote: =====> Downloading Buildpack: https://github.com/weibeld/heroku-buildpack-graphviz.git                                          
remote: =====> Detected Framework: Graphviz                                                                                             
remote: -----> Installing Graphviz version 2.36.0                                                                                       
remote:        (Ubuntu package graphviz_2.36.0-0ubuntu3.1_amd64.deb)                                                                    
remote: -----> Graphviz binaries in /app/graphviz/bin and added to PATH                                                                 
remote:                                                                                                                                 
remote: Using release configuration from last framework (Graphviz).                                                                     
remote:                                                                                                                                 
remote: -----> Discovering process types                                                                                                
remote:        Procfile declares types     -> web                                                                                       
remote:        Default types for buildpack -> console, rake, worker                                                                     
remote:                                                                                                                                 
remote: -----> Compressing...                                                                                                           
remote:        Done: 69M                                                                                                                
remote: -----> Launching...                                                                                                             
remote:        Released v38                                                                                                             
remote:        https://myhuginn.herokuapp.com/ deployed to Heroku                                                                      
remote:                                                                                                                                 
remote: Verifying deploy... done.                                                                                                       
To https://git.heroku.com/myhuginn.git                                                                                                 
   e5fcb24..bf7c2fe  master -> master                                                                                                   ```

@dsander
Copy link
Collaborator Author

dsander commented Mar 20, 2016

You need to run heroku run rake db:migrate manually, we should put that into the heroku update docs :)

@thiagotalma
Copy link
Contributor

Solved!!
Thank you very much!!

kamipo added a commit to rails/rails that referenced this pull request Feb 21, 2019
…collation issues

In MySQL, the default collation is case insensitive. Since the
uniqueness validator enforces case sensitive comparison by default, it
frequently causes mismatched collation issues (performance, weird
behavior, etc) to MySQL users.

https://grosser.it/2009/12/11/validates_uniqness_of-mysql-slow/
#1399
#13465
gitlabhq/gitlabhq@c1dddf8
huginn/huginn#1330 (comment)

This extracts `default_uniqueness_comparison` to ease to handle the
mismatched collation issues on the connection.
kamipo added a commit to kamipo/rails that referenced this pull request Mar 4, 2019
In MySQL, the default collation is case insensitive. Since the
uniqueness validator enforces case sensitive comparison by default, it
frequently causes mismatched collation issues (performance, weird
behavior, etc) to MySQL users.

https://grosser.it/2009/12/11/validates_uniqness_of-mysql-slow/
rails#1399
rails#13465
gitlabhq/gitlabhq@c1dddf8
huginn/huginn#1330 (comment)

I'd like to deprecate the implicit default enforcing since I frequently
experienced the problems in code reviews.

Note that this change has no effect to sqlite3, postgresql, and
oracle-enhanced adapters which are implemented as case sensitive by
default, only affect to mysql2 adapter (I can take a work if sqlserver
adapter will support Rails 6.0).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants