{"push_id":1080245495,"size":8,"distinct_size":1,"ref":"refs/heads/migrate_duplicate_users","head":"c6a7e1a891e32437202c4efc7cf2c6f5503641fc","before":"f83f444ee0e114e7d0eb3abefab145ee888fe81d","commits":[{"sha":"5e72027e1ec41fb29592d3df9be1f4b75d80236a","author":{"email":"96558bf9378c437d3852fad4fa4b4bd63aeb6eda@gmail.com","name":"David Rodríguez"},"message":"[deploy] Redeploy bins every time\n\nOut \"bins\" are part of the app (that's why they are committed to version\ncontrol), so they should be redeployed normally.\n\nThis should fix the following error in production / staging consoles\n\n```\n$ bin/rails c staging\n/var/www/beta.nolotiro.org/shared/Gemfile not found\n```","distinct":false,"url":"https://api.github.com/repos/alabs/nolotiro.org/commits/5e72027e1ec41fb29592d3df9be1f4b75d80236a"},{"sha":"ed6fce2f80e2b26b3765aed76045c294b5cef0cc","author":{"email":"96558bf9378c437d3852fad4fa4b4bd63aeb6eda@gmail.com","name":"David Rodríguez"},"message":"Merge pull request #207 from alabs/capistrano_bin_dir\n\n[deploy] Redeploy bins every time","distinct":false,"url":"https://api.github.com/repos/alabs/nolotiro.org/commits/ed6fce2f80e2b26b3765aed76045c294b5cef0cc"},{"sha":"bd6e8d38e69c4268554f1e1cb016b78785788426","author":{"email":"96558bf9378c437d3852fad4fa4b4bd63aeb6eda@gmail.com","name":"David Rodríguez"},"message":"[dev] Restore necessary instructions for DB setup","distinct":false,"url":"https://api.github.com/repos/alabs/nolotiro.org/commits/bd6e8d38e69c4268554f1e1cb016b78785788426"},{"sha":"3df4dd4325f5d2cca98335db0536a7047a4a1548","author":{"email":"96558bf9378c437d3852fad4fa4b4bd63aeb6eda@gmail.com","name":"David Rodríguez"},"message":"[seeds] Fix undefined variable error","distinct":false,"url":"https://api.github.com/repos/alabs/nolotiro.org/commits/3df4dd4325f5d2cca98335db0536a7047a4a1548"},{"sha":"df563b51efc7a951421422be0d0d0f9afd8c7800","author":{"email":"96558bf9378c437d3852fad4fa4b4bd63aeb6eda@gmail.com","name":"David Rodríguez"},"message":"Merge pull request #215 from alabs/dev_setup_fixes\n\nDev setup fixes","distinct":false,"url":"https://api.github.com/repos/alabs/nolotiro.org/commits/df563b51efc7a951421422be0d0d0f9afd8c7800"},{"sha":"04b62a8bec1ee1ac6e33ab9ef6a53bc3ad1d7662","author":{"email":"96558bf9378c437d3852fad4fa4b4bd63aeb6eda@gmail.com","name":"David Rodríguez"},"message":"[ads] Improve location counts performance\n\nSeveral performance improvements here:\n* Filter first, then resolver woeid names only of filtered items.\n* Group by SQL.\n* Count by SQL.\n* Sort by SQL.","distinct":false,"url":"https://api.github.com/repos/alabs/nolotiro.org/commits/04b62a8bec1ee1ac6e33ab9ef6a53bc3ad1d7662"},{"sha":"b618f7a0f760a8cb26cf372429f4534b28981809","author":{"email":"96558bf9378c437d3852fad4fa4b4bd63aeb6eda@gmail.com","name":"David Rodríguez"},"message":"Merge pull request #216 from alabs/improve_location_counts_performance\n\n[ads] Improve location counts performance","distinct":false,"url":"https://api.github.com/repos/alabs/nolotiro.org/commits/b618f7a0f760a8cb26cf372429f4534b28981809"},{"sha":"c6a7e1a891e32437202c4efc7cf2c6f5503641fc","author":{"email":"96558bf9378c437d3852fad4fa4b4bd63aeb6eda@gmail.com","name":"David Rodríguez"},"message":"[data] Add a task to migrate duplicate users\n\nThere are 1111 duplicated users in database. This is because we used to\nallow insertion of mixed-case emails in database. So now if\n\"EMAIL@example.com\" is already in database, insertion of a user with\nemail \"email@example.com\" won't fail, because what `devise` checks is\nthat the downcased version of the email to be inserted is not already in\ndatabase.\n\nFor the migration, I use several criteria to choose the preferred user.\nIn order of precedence:\n- Last login time.\n- Last published ad.\n- Last confirmation.\n- Last sent confirmation email.\n\nAfter that, all data is updated to point to the preferred user and the\nduplicated users are deleted.","distinct":true,"url":"https://api.github.com/repos/alabs/nolotiro.org/commits/c6a7e1a891e32437202c4efc7cf2c6f5503641fc"}]}