From dfc817830850b3cd15bbd4237a544206f679468c Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 4 Jan 2017 11:56:38 +0800 Subject: [PATCH] Revert "FIX: Wait 30 days before dropping the column." This reverts commit ffc97f22983d94a4d62af2efdca707244b3c405f. Should be safe now since we didn't get any reports. --- db/fixtures/001_categories.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/fixtures/001_categories.rb b/db/fixtures/001_categories.rb index 02adda656b3..bef41c56d62 100644 --- a/db/fixtures/001_categories.rb +++ b/db/fixtures/001_categories.rb @@ -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