Revert "FIX: Wait 30 days before dropping the column."

This reverts commit ffc97f2298.

Should be safe now since we didn't get any reports.
This commit is contained in:
Guo Xiang Tan 2017-01-04 11:56:38 +08:00
parent 43671b1fda
commit dfc8178308
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ if uncat_id == -1 || !Category.exists?(uncat_id)
end
# 60 minutes after our migration runs we need to exectue this code...
duration = Rails.env.production? ? 30 : 0
duration = Rails.env.production? ? 60 : 0
if Category.exec_sql("
SELECT 1 FROM schema_migration_details
WHERE EXISTS(
@ -33,7 +33,7 @@ if Category.exec_sql("
WHERE table_schema = 'public' AND table_name = 'categories' AND column_name = 'logo_url'
) AND
name = 'AddUploadsToCategories' AND
created_at < (current_timestamp at time zone 'UTC' - interval '#{duration} days')
created_at < (current_timestamp at time zone 'UTC' - interval '#{duration} minutes')
").to_a.length > 0