OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/db/migrate/20200217155632_rename_token...

14 lines
397 B

class RenameTokens < ActiveRecord::Migration[6.0]
class Token < ActiveRecord::Base
end
def up
Token.where(type: 'Token::Rss').update_all(type: 'Token::RSS')
Token.where(type: 'Token::Api').update_all(type: 'Token::API')
end
def down
Token.where(type: 'Token::RSS').update_all(type: 'Token::Rss')
Token.where(type: 'Token::API').update_all(type: 'Token::Api')
end
end