mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-06 20:16:00 -04:00
FIX: Use cmd_tuples
instead of checking row index for migration.
This commit is contained in:
parent
8b5a1cd20f
commit
206bf99553
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
class MigrateTosSetting < ActiveRecord::Migration
|
||||
def up
|
||||
res = execute("SELECT * FROM site_settings WHERE name = 'tos_accept_required' AND value = 't'")
|
||||
if res.present? && res[0].present?
|
||||
if res.present? && res.cmd_tuples > 0
|
||||
label = I18n.t("terms_of_service.signup_form_message")
|
||||
res = execute("SELECT value FROM site_texts WHERE text_type = 'tos_signup_form_message'")
|
||||
if res.present? && res.cmd_tuples == 1
|
||||
|
|
Loading…
Add table
Reference in a new issue