Skip to content
Snippets Groups Projects
Commit 13e9cc55 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

line type enum mapping changed to string in polyline_data

parent d07d6c57
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!472Resolve "Implement Hibernate naming strategy"
...@@ -12,6 +12,8 @@ import javax.persistence.CollectionTable; ...@@ -12,6 +12,8 @@ import javax.persistence.CollectionTable;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.ElementCollection; import javax.persistence.ElementCollection;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType; import javax.persistence.FetchType;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
...@@ -100,6 +102,7 @@ public class PolylineData implements Serializable { ...@@ -100,6 +102,7 @@ public class PolylineData implements Serializable {
/** /**
* Type of the line (pattern used to draw it). * Type of the line (pattern used to draw it).
*/ */
@Enumerated(EnumType.STRING)
private LineType type = LineType.SOLID; private LineType type = LineType.SOLID;
/** /**
......
-- change in arrow_type_data
alter table arrow_type_data add column arrow_line_type_string varchar(31); alter table arrow_type_data add column arrow_line_type_string varchar(31);
update arrow_type_data set arrow_line_type_string='SOLID' where arrow_line_type=0; update arrow_type_data set arrow_line_type_string='SOLID' where arrow_line_type=0;
update arrow_type_data set arrow_line_type_string='SOLID_BOLD' where arrow_line_type=1; update arrow_type_data set arrow_line_type_string='SOLID_BOLD' where arrow_line_type=1;
...@@ -9,4 +10,19 @@ update arrow_type_data set arrow_line_type_string='DASHED_BOLD' where arrow_line ...@@ -9,4 +10,19 @@ update arrow_type_data set arrow_line_type_string='DASHED_BOLD' where arrow_line
update arrow_type_data set arrow_line_type_string='DOUBLE' where arrow_line_type=7; update arrow_type_data set arrow_line_type_string='DOUBLE' where arrow_line_type=7;
alter table arrow_type_data drop column arrow_line_type; alter table arrow_type_data drop column arrow_line_type;
alter table arrow_type_data rename column arrow_line_type_string to arrow_line_type; alter table arrow_type_data rename column arrow_line_type_string to arrow_line_type;
\ No newline at end of file
-- change in polyline_data
alter table polyline_data add column type_string varchar(31);
update polyline_data set type_string='SOLID' where type=0;
update polyline_data set type_string='SOLID_BOLD' where type=1;
update polyline_data set type_string='DASH_DOT_DOT' where type=2;
update polyline_data set type_string='DASH_DOT' where type=3;
update polyline_data set type_string='DASHED' where type=4;
update polyline_data set type_string='DOTTED' where type=5;
update polyline_data set type_string='DASHED_BOLD' where type=6;
update polyline_data set type_string='DOUBLE' where type=7;
alter table polyline_data drop column type;
alter table polyline_data rename column type_string to type;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment