mirror of
https://github.com/redmine/redmine.git
synced 2025-12-16 05:20:28 +01:00
Remove trailing whitespaces from db/migrate (#31506).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18232 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -4,7 +4,7 @@ class AddUniqueIndexOnTokensValue < ActiveRecord::Migration[4.2]
|
||||
# Just in case
|
||||
duplicates = Token.connection.select_values("SELECT value FROM #{Token.table_name} GROUP BY value HAVING COUNT(id) > 1")
|
||||
Token.where(:value => duplicates).delete_all
|
||||
|
||||
|
||||
add_index :tokens, :value, :unique => true, :name => 'tokens_value'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user