mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Migration enum drop check constraints (#1435)
* Fix: apply drop checkConstraints properly which were not applied for Enum to String * Use IF EXISTS to drop constraints * added TODO and comment about MariaDB supporting CHECK constraints from version 10.2.1 forward compared to MySQL 5.7/8.0 parsing but ignoring CHECK constraints * updated reference scripts for dropping constraints on enums
This commit is contained in:
committed by
Rob Bygrave
parent
48b05eb358
commit
cf2d9df256
@@ -0,0 +1,29 @@
|
||||
package misc.migration.v1_2;
|
||||
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import io.ebean.annotation.EnumValue;
|
||||
|
||||
@Entity
|
||||
@Table(name = "migtest_e_enum")
|
||||
public class EEnum {
|
||||
|
||||
public enum Status {
|
||||
@EnumValue("N")
|
||||
NEW,
|
||||
|
||||
@EnumValue("A")
|
||||
ACTIVE,
|
||||
|
||||
@EnumValue("I")
|
||||
INACTIVE,
|
||||
}
|
||||
|
||||
@Id
|
||||
Integer id;
|
||||
|
||||
Status testStatus;
|
||||
}
|
||||
Reference in New Issue
Block a user