Skip to content

Commit 82a7ff4

Browse files
authored
fix(config): Removes disable_account_registration from database (#247)
* fix(config): Removes disable_account_registration from database * fix(config): Saves new config item, adds extra precautionary check
1 parent f07ec28 commit 82a7ff4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class DeleteDisableAccountRegistrationFromSettings < ActiveRecord::Migration[5.2]
2+
def self.up
3+
return unless HackathonConfig.find_by(var: 'disable_account_registration').present?
4+
HackathonConfig.find_by(var: 'disable_account_registration').destroy
5+
end
6+
7+
def self.down
8+
return unless HackathonConfig.find_by(var: 'disable_account_registration').nil?
9+
HackathonConfig.create(var: 'disable_account_registration', value: false).save
10+
end
11+
end

0 commit comments

Comments
 (0)