mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
* 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
30 lines
402 B
Java
30 lines
402 B
Java
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;
|
|
}
|