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

arrow type enum is mapped as string

parent 486d23b4
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"
......@@ -3,6 +3,8 @@ package lcsb.mapviewer.model.graphics;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
......@@ -42,6 +44,7 @@ public class ArrowTypeData implements Serializable {
/**
* Type of the arrow.
*/
@Enumerated(EnumType.STRING)
private ArrowType arrowType;
/**
......
alter table arrow_type_data add column arrow_type_string varchar(31);
update arrow_type_data set arrow_type_string='BLANK_CROSSBAR' where arrow_type=0;
update arrow_type_data set arrow_type_string='FULL_CROSSBAR' where arrow_type=1;
update arrow_type_data set arrow_type_string='DIAMOND' where arrow_type=2;
update arrow_type_data set arrow_type_string='BLANK' where arrow_type=3;
update arrow_type_data set arrow_type_string='CROSSBAR' where arrow_type=4;
update arrow_type_data set arrow_type_string='CIRCLE' where arrow_type=5;
update arrow_type_data set arrow_type_string='OPEN' where arrow_type=6;
update arrow_type_data set arrow_type_string='FULL' where arrow_type=7;
update arrow_type_data set arrow_type_string='NONE' where arrow_type=8;
alter table arrow_type_data drop column arrow_type;
alter table arrow_type_data rename column arrow_type_string to arrow_type;
\ No newline at end of file
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