Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
a5934e0c
Commit
a5934e0c
authored
14 years ago
by
izabel
Browse files
Options
Downloads
Patches
Plain Diff
[LMS-1701] remove of redundant channel stacks
SVN: 17519
parent
9f93d632
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
screening/source/sql/postgresql/migration/migration-005-006.sql
+8
-0
8 additions, 0 deletions
...ing/source/sql/postgresql/migration/migration-005-006.sql
with
8 additions
and
0 deletions
screening/source/sql/postgresql/migration/migration-005-006.sql
+
8
−
0
View file @
a5934e0c
-- Migration from 005 to 006
-- 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
ADD
COLUMN
CODE
NAME
;
ALTER
TABLE
CHANNELS
DROP
CONSTRAINT
CHANNELS_UK_1
;
ALTER
TABLE
CHANNELS
DROP
CONSTRAINT
CHANNELS_UK_1
;
ALTER
TABLE
CHANNELS
DROP
CONSTRAINT
CHANNELS_UK_2
;
ALTER
TABLE
CHANNELS
DROP
CONSTRAINT
CHANNELS_UK_2
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment