Commit d49c67a7 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

db migration files merged

parent 2d71c156
Pipeline #29609 failed with stage
in 15 minutes and 43 seconds
......@@ -497,7 +497,7 @@ CREATE TABLE public.plugin_data_entry_table (
plugin_id integer NOT NULL,
user_id integer,
key character varying(1024) NOT NULL,
value character varying(2048) NOT NULL
value character varying(1048576) NOT NULL
);
CREATE TABLE public.plugin_table (
......
-- alignment columns
alter table element_table add column name_horizontal_align character varying(255);
alter table element_table add column name_vertical_align character varying(255);
update element_table set name_horizontal_align='LEFT' where name_point is not null;
update element_table set name_vertical_align='TOP' where name_point is not null;
update element_table set name_horizontal_align='CENTER' where name_point is null;
update element_table set name_vertical_align='MIDDLE' where name_point is null;
--temporary coordinates
alter table element_table add column name_x double precision;
alter table element_table add column name_y double precision;
--coordinates of complex text
update element_table set name_x = x+(width/2) where element_type_db='COMPLEX';
update element_table set name_y = y+height - font_size where element_type_db='COMPLEX';
--coordinates of other species
update element_table set name_x = x+(width/2) where name_x is null and name_point is null;
update element_table set name_y = y+(height/2) where name_y is null and name_point is null;
update element_table set name_point = concat(name_x,',', name_y) where name_point is null;
alter table element_table drop column name_x;
alter table element_table drop column name_y;
--not null
alter table element_table alter column name_point set not null;
alter table element_table alter column name_horizontal_align set not null;
alter table element_table alter column name_vertical_align set not null;
alter table layer_rect_table rename column color to border_color;
alter table layer_rect_table add column fill_color VARBINARY(1G);
CREATE SEQUENCE reset_password_token_sequence
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE;
CREATE TABLE reset_password_token_table
(
id integer DEFAULT nextval('public.reset_password_token_sequence') NOT NULL,
token character varying(255) NOT NULL,
user_id integer not null,
expires timestamp without time zone,
CONSTRAINT reset_password_token_pk PRIMARY KEY (id),
CONSTRAINT reset_password_token_user_fk FOREIGN KEY (user_id)
REFERENCES user_table (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION
);
delete from cache_query_table where query like '%urn:miriam:obo.eco%';
alter table reaction_table add column process_coordinates character varying(255);
\ No newline at end of file
......@@ -306,13 +306,7 @@ abstract public class ControllerIntegrationTest {
Element element = createProtein();
map.addElement(element);
Element element2 = new SimpleMolecule("s2");
element2.setName("water");
element2.setWidth(100.0);
element2.setHeight(20.0);
element2.setX(10);
element2.setX(20);
element2.setZ(2);
Element element2 = createSimpleMolecule();
map.addElement(element2);
Reactant reactant = new Reactant(element2);
......@@ -338,10 +332,24 @@ abstract public class ControllerIntegrationTest {
return project;
}
private Element createSimpleMolecule() {
Element element2 = new SimpleMolecule("s"+(counter++));
element2.setName("water");
element2.setWidth(100.0);
element2.setHeight(20.0);
element2.setX(10);
element2.setX(20);
element2.setZ(2);
element2.setNamePoint(element2.getCenter());
element2.setNameHorizontalAlign(HorizontalAlign.CENTER);
element2.setNameVerticalAlign(VerticalAlign.MIDDLE);
return element2;
}
int counter = 1;
private GenericProtein createProtein() {
GenericProtein element = new GenericProtein("p"+(counter++));
GenericProtein element = new GenericProtein("s"+(counter++));
element.setName("GSTA4");
element.setWidth(100.0);
element.setHeight(20.0);
......
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