From 36928c98e94d2297c804bea5aba6b8aff21819d5 Mon Sep 17 00:00:00 2001 From: tpylak <tpylak> Date: Tue, 14 Dec 2010 13:41:49 +0000 Subject: [PATCH] LMS-1915 fix migration SVN: 19137 --- .../source/sql/postgresql/migration/migration-008-009.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/screening/source/sql/postgresql/migration/migration-008-009.sql b/screening/source/sql/postgresql/migration/migration-008-009.sql index 54d146739b6..44ca7e1de82 100644 --- a/screening/source/sql/postgresql/migration/migration-008-009.sql +++ b/screening/source/sql/postgresql/migration/migration-008-009.sql @@ -35,9 +35,9 @@ CREATE TRIGGER CHANNEL_STACKS_CHECK BEFORE INSERT OR UPDATE ON CHANNEL_STACKS --- for each spot set exactly one representative channel_stacks record (with minimal id) --------- -update channel_stacks as cs - set cs.is_representative = 'T' - where cs.id in (select min(cs.id) +update channel_stacks + set is_representative = 'T' + where id in (select min(cs.id) from channel_stacks cs join spots on spots.id = cs.spot_id group by spots.id) \ No newline at end of file -- GitLab