mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Use unique index rather than constraint when using formula [like lower(column)]
This commit is contained in:
@@ -9,10 +9,10 @@ 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(name = "ix_m12_otoc71", columnNames = "name", platforms = {POSTGRES})
|
||||
@Index(name = "ix_m12_otoc72", columnNames = "name", platforms = {MYSQL})
|
||||
@Index(unique = true, name = "uq_m12_otoc71", columnNames = "lower(name)", platforms = {POSTGRES})
|
||||
@Index(unique = true, name = "uq_m12_otoc72", columnNames = "name", platforms = {MYSQL})
|
||||
@Index(columnNames = "name", platforms = POSTGRES)
|
||||
@Entity
|
||||
@Table(name = "migtest_oto_child")
|
||||
|
||||
@@ -9,10 +9,9 @@ import javax.persistence.Table;
|
||||
import static io.ebean.annotation.Platform.MYSQL;
|
||||
import static io.ebean.annotation.Platform.POSTGRES;
|
||||
|
||||
@Index(columnNames = "foo(name)", platforms = {POSTGRES})
|
||||
@Index(columnNames = "bar(name)", platforms = {MYSQL})
|
||||
@Index(unique = true, columnNames = "foo(name)", platforms = {POSTGRES})
|
||||
@Index(unique = true, columnNames = "bar(name)", platforms = {MYSQL})
|
||||
@Index(columnNames = "name", platforms = {MYSQL})
|
||||
@Index(unique = true, columnNames = "lower(name)", platforms = {POSTGRES})
|
||||
@Index(unique = true, columnNames = "name", platforms = {MYSQL})
|
||||
@Entity
|
||||
@Table(name = "migtest_oto_master")
|
||||
public class OtoMaster {
|
||||
|
||||
Reference in New Issue
Block a user