mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
This is a potential alternative to using extra-dll.xml. Might be appropriate to use over extra-dll in small simple cases. We might look to extend this in the future to allow full raw platform specific ddl - the ability to specify the entire create index statement.
43 lines
996 B
Java
43 lines
996 B
Java
package misc.migration.v1_2;
|
|
|
|
import io.ebean.annotation.Index;
|
|
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Table;
|
|
|
|
import static io.ebean.annotation.Platform.MYSQL;
|
|
import static io.ebean.annotation.Platform.POSTGRES;
|
|
|
|
@Index(name = "ix_m12_otoc71", columnNames = "foo(name)", platforms = {POSTGRES})
|
|
@Index(name = "ix_m12_otoc72", columnNames = "bar(name)", platforms = {MYSQL})
|
|
@Index(unique = true, name = "uq_m12_otoc71", columnNames = "uqFoo(name)", platforms = {POSTGRES})
|
|
@Index(unique = true, name = "uq_m12_otoc72", columnNames = "uqBar(name)", platforms = {MYSQL})
|
|
@Index(columnNames = "name", platforms = POSTGRES)
|
|
@Entity
|
|
@Table(name = "migtest_oto_child")
|
|
public class OtoChild {
|
|
|
|
@Id
|
|
Integer id;
|
|
|
|
String name;
|
|
|
|
public Integer getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Integer id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
}
|