From 3e69a4f4e8a9ca72712618b3546de22c236c0f16 Mon Sep 17 00:00:00 2001 From: William Woodson Date: Mon, 22 Feb 2016 20:11:02 -0600 Subject: [PATCH] Update 20160221001538_0.1.2_store-smtp-settings.sql Makes more sense to use campaigns.id in this select --- db/migrations/20160221001538_0.1.2_store-smtp-settings.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrations/20160221001538_0.1.2_store-smtp-settings.sql b/db/migrations/20160221001538_0.1.2_store-smtp-settings.sql index 1670dce8..3e85cbaf 100644 --- a/db/migrations/20160221001538_0.1.2_store-smtp-settings.sql +++ b/db/migrations/20160221001538_0.1.2_store-smtp-settings.sql @@ -5,7 +5,7 @@ ALTER TABLE campaigns ADD COLUMN smtp_id bigint; UPDATE campaigns SET smtp_id = (SELECT smtp.smtp_id FROM smtp) WHERE campaigns.id = ( - SELECT smtp.smtp_id + SELECT campaigns.id FROM smtp,campaigns WHERE smtp.campaign_id=campaigns.id )