Commit 33056d70 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

update script fixed for machines where all elements are inside compartments

parent 17feca8a
Pipeline #11277 passed with stage
in 9 minutes and 45 seconds
minerva (13.1.1) stable; urgency=medium
* Bug fix: adding gene mapping before the genome caused an error (#835)
* Bug fix: "Terms of Use" change to "Terms of Service" in all places (#843)
* Bug fix: upgrade to 13.1.0 crashed on machines where every element was
inside compartment (#856)
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 28 Jun 2019 17:00:00 +0200
......
......@@ -2,6 +2,8 @@
alter table element_table add column z integer;
alter table reaction_table add column z integer;
--add artificial element outside compartment, so the update queries will always return non-null values
insert into element_table (id, element_type_db, visibility_level, width, height) values(-1, 'GENERIC_PROTEIN', 0, 1,1);
with v_element_table as
(
......@@ -69,3 +71,6 @@ update element_table set z = (select max(z) from element_table) where z is null;
ALTER TABLE element_table ALTER COLUMN z SET NOT NULL;
ALTER TABLE reaction_table ALTER COLUMN z SET NOT NULL;
--remove artificial element added at the beginning of the script
delete from element_table where id = -1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment