diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-05-23 14:09:19 +0200 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-05-24 22:29:59 +0200 |
commit | 3713a57fe8c40bfccaa668d081caccb92354b1da (patch) | |
tree | bbd705a9ab40daefd95f7f143ca672ed4bd74561 /db/migrate | |
parent | c013d23d6320487cf293891f7c6b213cab816980 (diff) | |
download | gitlab-ce-3713a57fe8c40bfccaa668d081caccb92354b1da.tar.gz |
add rss_token attribute to user model
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20170523091700_add_rss_token_to_users.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20170523091700_add_rss_token_to_users.rb b/db/migrate/20170523091700_add_rss_token_to_users.rb new file mode 100644 index 00000000000..06a85f6ac3d --- /dev/null +++ b/db/migrate/20170523091700_add_rss_token_to_users.rb @@ -0,0 +1,19 @@ +class AddRssTokenToUsers < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column :users, :rss_token, :string + + add_concurrent_index :users, :rss_token + end + + def down + remove_concurrent_index :users, :rss_token if index_exists? :users, :rss_token + + remove_column :users, :rss_token + end +end |