From c47b60a1e464268f8ac219b032ffb24bf5e83d89 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 15 Dec 2016 20:53:10 +0800 Subject: [PATCH] FIX: Check for column that we want to drop instead. * Otherwise, the migration is called multiple times. --- db/fixtures/001_categories.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/fixtures/001_categories.rb b/db/fixtures/001_categories.rb index b1bfc5cbb97..bef41c56d62 100644 --- a/db/fixtures/001_categories.rb +++ b/db/fixtures/001_categories.rb @@ -30,7 +30,7 @@ if Category.exec_sql(" SELECT 1 FROM schema_migration_details WHERE EXISTS( SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS - WHERE table_schema = 'public' AND table_name = 'categories' AND column_name = 'uploaded_logo_id' + 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} minutes')