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

history type mapping changed to string

parent f03cb69f
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"
......@@ -5,6 +5,8 @@ import java.util.Calendar;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
......@@ -55,10 +57,11 @@ public class SearchHistory implements Serializable {
* Type of the search event.
*/
@Column(nullable = false)
@Enumerated(EnumType.STRING)
private SearchType type;
/**
* Client ip address.
* Client IP address.
*/
@Column(nullable = false)
private String ipAddress;
......
-- change in layout
alter table history_table add column type_string varchar(31);
update history_table set type_string='GENERAL' where type=0;
update history_table set type_string='DRUG' where type=1;
update history_table set type_string='CHEMICAL' where type=2;
update history_table set type_string='MI_RNA' where type=3;
alter table history_table drop column type;
alter table history_table 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