diff --git a/screening/source/sql/postgresql/migration/migration-005-006.sql b/screening/source/sql/postgresql/migration/migration-005-006.sql
index 426233d4225ad995e6491da8e6e7fec1b3bbdd68..ad1838b489c45af64ea7dae2fa349b5fddd97813 100644
--- a/screening/source/sql/postgresql/migration/migration-005-006.sql
+++ b/screening/source/sql/postgresql/migration/migration-005-006.sql
@@ -1,13 +1,5 @@
 -- Migration from 005 to 006
 
-
--- Remove references to redundant channel stacks
-update acquired_images set channel_stack_id = mapping.new from (select cs.id as old, ucs.max_id as new from (select  max(id) as max_id,x,y,spot_id,ds_id from channel_stacks group by x,y,spot_id,ds_id) as ucs, channel_stacks cs where cs.x = ucs.x and cs.y = ucs.y and cs.spot_id = ucs.spot_id and cs.ds_id = ucs.ds_id and not cs.id = ucs.max_id) as mapping where mapping.old = channel_stack_id;
-
--- Remove redundant channel stacks
-delete from channel_stacks where id not in (select  max(id) as max_id from channel_stacks group by x,y,spot_id,ds_id);
-
-
 ALTER TABLE CHANNELS ADD COLUMN CODE NAME;
 ALTER TABLE CHANNELS DROP CONSTRAINT CHANNELS_UK_1;
 ALTER TABLE CHANNELS DROP CONSTRAINT CHANNELS_UK_2;