mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Compare commits
29
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a3c6b9dad | ||
|
|
502eb78ffd | ||
|
|
761ec584b2 | ||
|
|
144b8c3077 | ||
|
|
79a1b3a024 | ||
|
|
519b75a778 | ||
|
|
1659c526d7 | ||
|
|
93fc7b07a0 | ||
|
|
d7e6feebc2 | ||
|
|
2a6c60c89b | ||
|
|
b569ec97ee | ||
|
|
6b6cf48ae2 | ||
|
|
f09cba3ab5 | ||
|
|
724183f669 | ||
|
|
a40212d41e | ||
|
|
c9ce02c43d | ||
|
|
03c9782d63 | ||
|
|
130e9451f4 | ||
|
|
dce6a3e9e1 | ||
|
|
486044d29b | ||
|
|
934b0f0044 | ||
|
|
2633cd6bfe | ||
|
|
2c81d0df03 | ||
|
|
9ef59e359b | ||
|
|
6561f6f5e7 | ||
|
|
b2e8e628fa | ||
|
|
bbb8d85971 | ||
|
|
14b94ebe12 | ||
|
|
f5f59d90d4 |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-clickhouse</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-clickhouse</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-cockroach</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-db2</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-db2</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-h2</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-hana</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hana</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-mariadb</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mariadb</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-mysql</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-nuodb</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-nuodb</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-oracle</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-oracle</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-postgres</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-sqlite</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlite</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-sqlserver</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-yugabyte</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean (all platforms)</name>
|
||||
@@ -16,31 +16,31 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-joda-time</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-jsonnode</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -53,18 +53,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>composites</artifactId>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean api</name>
|
||||
|
||||
@@ -231,18 +231,6 @@ public class OrderBy<T> implements Serializable {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if this order by can be used in select clause.
|
||||
*/
|
||||
public boolean supportsSelect() {
|
||||
for (Property property : list) {
|
||||
if (!property.supportsSelect()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* A property and its ascending descending order.
|
||||
*/
|
||||
@@ -403,12 +391,6 @@ public class OrderBy<T> implements Serializable {
|
||||
this.ascending = ascending;
|
||||
}
|
||||
|
||||
/**
|
||||
* Support use in select clause if no collation or nulls ordering.
|
||||
*/
|
||||
boolean supportsSelect() {
|
||||
return nulls == null;
|
||||
}
|
||||
}
|
||||
|
||||
private void parse(String orderByClause) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
<!-- <parent>-->
|
||||
<!-- <groupId>org.avaje</groupId>-->
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
|
||||
<name>ebean autotune</name>
|
||||
@@ -26,7 +26,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+32
-32
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean bom</name>
|
||||
@@ -89,106 +89,106 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-joda-time</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-jsonnode</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-xml</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-autotune</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- platforms -->
|
||||
@@ -196,85 +196,85 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-all</artifactId>
|
||||
<version>13.11.1-SNAPSHOT</version>
|
||||
<version>13.11.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-clickhouse</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-db2</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-h2</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-hana</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-hsqldb</artifactId>
|
||||
<version>13.11.1-SNAPSHOT</version>
|
||||
<version>13.11.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-mariadb</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-mysql</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-nuodb</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-oracle</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgres</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-sqlanywhere</artifactId>
|
||||
<version>13.11.1-SNAPSHOT</version>
|
||||
<version>13.11.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-sqlite</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-sqlserver</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
+8
-8
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core</artifactId>
|
||||
@@ -15,14 +15,14 @@
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -46,13 +46,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -143,21 +143,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ public final class LoadManyRequest extends LoadRequest {
|
||||
log.log(DEBUG, "BeanCollection after lazy load was empty. type:{0} id:{1} owner:{2}", ownerBean.getClass().getName(), parentId, ownerBean);
|
||||
}
|
||||
} else if (loadCache && many.isUseCache()) {
|
||||
desc.cacheManyPropPut(many, bc, desc.getId(bc.getOwnerBean()));
|
||||
desc.cacheManyPropPut(many, bc, desc.cacheKeyForBean(bc.getOwnerBean()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+17
-17
@@ -91,15 +91,15 @@ public final class CacheChangeSet {
|
||||
/**
|
||||
* Add many property remove.
|
||||
*/
|
||||
public <T> void addManyRemove(BeanDescriptor<T> desc, String manyProperty, Object parentId) {
|
||||
many(desc, manyProperty).addRemove(parentId);
|
||||
public <T> void addManyRemove(BeanDescriptor<T> desc, String manyProperty, String parentKey) {
|
||||
many(desc, manyProperty).addRemove(parentKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add many property put.
|
||||
*/
|
||||
public <T> void addManyPut(BeanDescriptor<T> desc, String manyProperty, Object parentId, CachedManyIds entry) {
|
||||
many(desc, manyProperty).addPut(parentId, entry);
|
||||
public <T> void addManyPut(BeanDescriptor<T> desc, String manyProperty, String parentKey, CachedManyIds entry) {
|
||||
many(desc, manyProperty).addPut(parentKey, entry);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,8 +164,8 @@ public final class CacheChangeSet {
|
||||
private static final class ManyChange implements CacheChange {
|
||||
|
||||
final ManyKey key;
|
||||
final Set<Object> removes = new HashSet<>();
|
||||
final Map<Object, CachedManyIds> puts = new LinkedHashMap<>();
|
||||
final Set<String> removes = new HashSet<>();
|
||||
final Map<String, CachedManyIds> puts = new LinkedHashMap<>();
|
||||
boolean clear;
|
||||
|
||||
ManyChange(ManyKey key) {
|
||||
@@ -183,17 +183,17 @@ public final class CacheChangeSet {
|
||||
/**
|
||||
* Remove entry for the given parentId.
|
||||
*/
|
||||
void addRemove(Object parentId) {
|
||||
void addRemove(String parentKey) {
|
||||
if (!clear) {
|
||||
removes.add(parentId);
|
||||
removes.add(parentKey);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Put entry for the given parentId.
|
||||
*/
|
||||
void addPut(Object parentId, CachedManyIds entry) {
|
||||
puts.put(parentId, entry);
|
||||
void addPut(String parentKey, CachedManyIds entry) {
|
||||
puts.put(parentKey, entry);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -201,11 +201,11 @@ public final class CacheChangeSet {
|
||||
if (clear) {
|
||||
key.cacheClear();
|
||||
} else {
|
||||
for (Map.Entry<Object, CachedManyIds> entry : puts.entrySet()) {
|
||||
for (Map.Entry<String, CachedManyIds> entry : puts.entrySet()) {
|
||||
key.cachePut(entry.getKey(), entry.getValue());
|
||||
}
|
||||
for (Object parentId : removes) {
|
||||
key.cacheRemove(parentId);
|
||||
for (String parentKey : removes) {
|
||||
key.cacheRemove(parentKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -241,12 +241,12 @@ public final class CacheChangeSet {
|
||||
desc.cacheManyPropClear(manyProperty);
|
||||
}
|
||||
|
||||
void cachePut(Object parentId, CachedManyIds entry) {
|
||||
desc.cacheManyPropPut(manyProperty, parentId, entry);
|
||||
void cachePut(String parentKey, CachedManyIds entry) {
|
||||
desc.cacheManyPropPut(manyProperty, parentKey, entry);
|
||||
}
|
||||
|
||||
void cacheRemove(Object parentId) {
|
||||
desc.cacheManyPropRemove(manyProperty, parentId);
|
||||
void cacheRemove(String parentKey) {
|
||||
desc.cacheManyPropRemove(manyProperty, parentKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -130,7 +130,7 @@ final class DefaultCacheHolder {
|
||||
}
|
||||
|
||||
private ServerCacheOptions getQueryOptions(Class<?> cls) {
|
||||
CacheQueryTuning tuning = AnnotationUtil.get(cls, CacheQueryTuning.class);
|
||||
CacheQueryTuning tuning = AnnotationUtil.typeGet(cls, CacheQueryTuning.class);
|
||||
if (tuning != null) {
|
||||
return new ServerCacheOptions(tuning).applyDefaults(queryDefault);
|
||||
}
|
||||
@@ -138,9 +138,9 @@ final class DefaultCacheHolder {
|
||||
}
|
||||
|
||||
private ServerCacheOptions getBeanOptions(Class<?> cls) {
|
||||
Cache cache = cls.getAnnotation(Cache.class);
|
||||
Cache cache = AnnotationUtil.typeGet(cls, Cache.class);
|
||||
boolean nearCache = (cache != null && cache.nearCache());
|
||||
CacheBeanTuning tuning = cls.getAnnotation(CacheBeanTuning.class);
|
||||
CacheBeanTuning tuning = AnnotationUtil.typeGet(cls, CacheBeanTuning.class);
|
||||
if (tuning != null) {
|
||||
return new ServerCacheOptions(nearCache, tuning).applyDefaults(beanDefault);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,8 @@ final class DefaultBeanLoader {
|
||||
if (ebi.isReadOnly()) {
|
||||
readOnly = Boolean.TRUE;
|
||||
}
|
||||
if (parentDesc.cacheManyPropLoad(many, beanCollection, parentId, readOnly)) {
|
||||
final String parentKey = parentDesc.cacheKey(parentId);
|
||||
if (parentDesc.cacheManyPropLoad(many, beanCollection, parentKey, readOnly)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -113,7 +114,8 @@ final class DefaultBeanLoader {
|
||||
log.log(DEBUG, "BeanCollection after load was empty. Owner:{0}", beanCollection.getOwnerBean());
|
||||
}
|
||||
} else if (useManyIdCache) {
|
||||
parentDesc.cacheManyPropPut(many, beanCollection, parentId);
|
||||
final String parentKey = parentDesc.cacheKey(parentId);
|
||||
parentDesc.cacheManyPropPut(many, beanCollection, parentKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1202,26 +1202,26 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
|
||||
/**
|
||||
* Try to load the beanCollection from cache return true if successful.
|
||||
*/
|
||||
public boolean cacheManyPropLoad(BeanPropertyAssocMany<?> many, BeanCollection<?> bc, Object parentId, Boolean readOnly) {
|
||||
return cacheHelp.manyPropLoad(many, bc, parentId, readOnly);
|
||||
public boolean cacheManyPropLoad(BeanPropertyAssocMany<?> many, BeanCollection<?> bc, String parentKey, Boolean readOnly) {
|
||||
return cacheHelp.manyPropLoad(many, bc, parentKey, readOnly);
|
||||
}
|
||||
|
||||
/**
|
||||
* Put the beanCollection into the cache.
|
||||
*/
|
||||
public void cacheManyPropPut(BeanPropertyAssocMany<?> many, BeanCollection<?> bc, Object parentId) {
|
||||
cacheHelp.manyPropPut(many, bc, parentId);
|
||||
public void cacheManyPropPut(BeanPropertyAssocMany<?> many, BeanCollection<?> bc, String parentKey) {
|
||||
cacheHelp.manyPropPut(many, bc, parentKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the bean collection entry in the cache.
|
||||
*/
|
||||
public void cacheManyPropPut(String name, Object parentId, CachedManyIds entry) {
|
||||
cacheHelp.cachePutManyIds(parentId, name, entry);
|
||||
public void cacheManyPropPut(String name, String parentKey, CachedManyIds entry) {
|
||||
cacheHelp.cachePutManyIds(name, parentKey, entry);
|
||||
}
|
||||
|
||||
public void cacheManyPropRemove(String propertyName, Object parentId) {
|
||||
cacheHelp.manyPropRemove(propertyName, parentId);
|
||||
public void cacheManyPropRemove(String propertyName, String parentKey) {
|
||||
cacheHelp.manyPropRemove(propertyName, parentKey);
|
||||
}
|
||||
|
||||
public void cacheManyPropClear(String propertyName) {
|
||||
@@ -2096,7 +2096,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
|
||||
/**
|
||||
* Return the cache key for the given bean (based on id value).
|
||||
*/
|
||||
String cacheKeyForBean(EntityBean bean) {
|
||||
public String cacheKeyForBean(EntityBean bean) {
|
||||
return cacheKey(idProperty.getValue(bean));
|
||||
}
|
||||
|
||||
@@ -2112,11 +2112,6 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
|
||||
return getId((EntityBean) bean);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public Object beanId(T bean) {
|
||||
// return getId((EntityBean) bean);
|
||||
// }
|
||||
|
||||
/**
|
||||
* Return the Id value for the bean with embeddedId beans converted into maps.
|
||||
* <p>
|
||||
|
||||
+19
-19
@@ -226,13 +226,12 @@ final class BeanDescriptorCacheHelp<T> {
|
||||
queryCache.put(id, entry);
|
||||
}
|
||||
|
||||
|
||||
void manyPropRemove(String propertyName, Object parentId) {
|
||||
void manyPropRemove(String propertyName, String parentKey) {
|
||||
ServerCache collectionIdsCache = cacheManager.getCollectionIdsCache(beanType, propertyName);
|
||||
if (manyLog.isLoggable(TRACE)) {
|
||||
manyLog.log(TRACE, " REMOVE {0}({1}).{2}", cacheName, parentId, propertyName);
|
||||
manyLog.log(TRACE, " REMOVE {0}({1}).{2}", cacheName, parentKey, propertyName);
|
||||
}
|
||||
collectionIdsCache.remove(parentId);
|
||||
collectionIdsCache.remove(parentKey);
|
||||
}
|
||||
|
||||
void manyPropClear(String propertyName) {
|
||||
@@ -246,15 +245,15 @@ final class BeanDescriptorCacheHelp<T> {
|
||||
/**
|
||||
* Return the CachedManyIds for a given bean many property. Returns null if not in the cache.
|
||||
*/
|
||||
private CachedManyIds manyPropGet(Object parentId, String propertyName) {
|
||||
private CachedManyIds manyPropGet(String propertyName, String parentKey) {
|
||||
ServerCache collectionIdsCache = cacheManager.getCollectionIdsCache(beanType, propertyName);
|
||||
CachedManyIds entry = (CachedManyIds) collectionIdsCache.get(parentId);
|
||||
CachedManyIds entry = (CachedManyIds) collectionIdsCache.get(parentKey);
|
||||
if (entry == null) {
|
||||
if (manyLog.isLoggable(TRACE)) {
|
||||
manyLog.log(TRACE, " GET {0}({1}).{2} - cache miss", cacheName, parentId, propertyName);
|
||||
manyLog.log(TRACE, " GET {0}({1}).{2} - cache miss", cacheName, parentKey, propertyName);
|
||||
}
|
||||
} else if (manyLog.isLoggable(DEBUG)) {
|
||||
manyLog.log(DEBUG, " GET {0}({1}).{2} - hit", cacheName, parentId, propertyName);
|
||||
manyLog.log(DEBUG, " GET {0}({1}).{2} - hit", cacheName, parentKey, propertyName);
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
@@ -262,12 +261,12 @@ final class BeanDescriptorCacheHelp<T> {
|
||||
/**
|
||||
* Try to load the bean collection from cache return true if successful.
|
||||
*/
|
||||
boolean manyPropLoad(BeanPropertyAssocMany<?> many, BeanCollection<?> bc, Object parentId, Boolean readOnly) {
|
||||
boolean manyPropLoad(BeanPropertyAssocMany<?> many, BeanCollection<?> bc, String parentKey, Boolean readOnly) {
|
||||
if (many.isElementCollection()) {
|
||||
// held as part of the bean cache so skip
|
||||
return false;
|
||||
}
|
||||
CachedManyIds entry = manyPropGet(parentId, many.name());
|
||||
CachedManyIds entry = manyPropGet(many.name(), parentKey);
|
||||
if (entry == null) {
|
||||
// not in cache so return unsuccessful
|
||||
return false;
|
||||
@@ -293,9 +292,9 @@ final class BeanDescriptorCacheHelp<T> {
|
||||
/**
|
||||
* Put the beanCollection into the cache.
|
||||
*/
|
||||
void manyPropPut(BeanPropertyAssocMany<?> many, Object details, Object parentId) {
|
||||
void manyPropPut(BeanPropertyAssocMany<?> many, Object details, String parentKey) {
|
||||
if (many.isElementCollection()) {
|
||||
CachedBeanData data = (CachedBeanData) beanCache.get(parentId);
|
||||
CachedBeanData data = (CachedBeanData) beanCache.get(parentKey);
|
||||
if (data != null) {
|
||||
try {
|
||||
// add as JSON to bean cache
|
||||
@@ -305,9 +304,9 @@ final class BeanDescriptorCacheHelp<T> {
|
||||
|
||||
CachedBeanData newData = data.update(changes, data.getVersion());
|
||||
if (beanLog.isLoggable(DEBUG)) {
|
||||
beanLog.log(DEBUG, " UPDATE {0}({1}) changes:{2}", cacheName, parentId, changes);
|
||||
beanLog.log(DEBUG, " UPDATE {0}({1}) changes:{2}", cacheName, parentKey, changes);
|
||||
}
|
||||
beanCache.put(parentId, newData);
|
||||
beanCache.put(parentKey, newData);
|
||||
} catch (IOException e) {
|
||||
log.log(ERROR, "Error updating L2 cache", e);
|
||||
}
|
||||
@@ -315,17 +314,17 @@ final class BeanDescriptorCacheHelp<T> {
|
||||
} else {
|
||||
CachedManyIds entry = createManyIds(many, details);
|
||||
if (entry != null) {
|
||||
cachePutManyIds(parentId, many.name(), entry);
|
||||
cachePutManyIds(many.name(), parentKey, entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cachePutManyIds(Object parentId, String manyName, CachedManyIds entry) {
|
||||
void cachePutManyIds(String manyName, String parentKey, CachedManyIds entry) {
|
||||
ServerCache collectionIdsCache = cacheManager.getCollectionIdsCache(beanType, manyName);
|
||||
if (manyLog.isLoggable(DEBUG)) {
|
||||
manyLog.log(DEBUG, " PUT {0}({1}).{2} - ids:{3}", cacheName, parentId, manyName, entry);
|
||||
manyLog.log(DEBUG, " PUT {0}({1}).{2} - ids:{3}", cacheName, parentKey, manyName, entry);
|
||||
}
|
||||
collectionIdsCache.put(parentId, entry);
|
||||
collectionIdsCache.put(parentKey, entry);
|
||||
}
|
||||
|
||||
private CachedManyIds createManyIds(BeanPropertyAssocMany<?> many, Object details) {
|
||||
@@ -828,7 +827,8 @@ final class BeanDescriptorCacheHelp<T> {
|
||||
Object details = many.getValue(updateRequest.entityBean());
|
||||
CachedManyIds entry = createManyIds(many, details);
|
||||
if (entry != null) {
|
||||
changeSet.addManyPut(desc, many.name(), id, entry);
|
||||
final String parentKey = desc.cacheKey(id);
|
||||
changeSet.addManyPut(desc, many.name(), parentKey, entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +197,8 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> implements STr
|
||||
if (assocBean != null) {
|
||||
Object parentId = targetDescriptor.id(assocBean);
|
||||
if (parentId != null) {
|
||||
changeSet.addManyRemove(targetDescriptor, relationshipProperty.name(), parentId);
|
||||
final String parentKey = targetDescriptor.cacheKey(parentId);
|
||||
changeSet.addManyRemove(targetDescriptor, relationshipProperty.name(), parentKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -465,10 +465,9 @@ final class AnnotationFields extends AnnotationParser {
|
||||
if (!gen.generator().isEmpty()) {
|
||||
// use a custom IdGenerator
|
||||
PlatformIdGenerator idGenerator = generatedPropFactory.getIdGenerator(gen.generator());
|
||||
if (idGenerator == null) {
|
||||
throw new IllegalStateException("No custom IdGenerator registered with name " + gen.generator());
|
||||
if (idGenerator != null) {
|
||||
descriptor.setCustomIdGenerator(idGenerator);
|
||||
}
|
||||
descriptor.setCustomIdGenerator(idGenerator);
|
||||
} else if (prop.getPropertyType().equals(UUID.class)) {
|
||||
descriptor.setUuidGenerator();
|
||||
}
|
||||
|
||||
@@ -205,7 +205,8 @@ final class DLoadManyContext extends DLoadBaseContext implements LoadManyContext
|
||||
EntityBean ownerBean = bc.getOwnerBean();
|
||||
BeanDescriptor<?> parentDesc = context.desc.descriptor(ownerBean.getClass());
|
||||
Object parentId = parentDesc.getId(ownerBean);
|
||||
if (parentDesc.cacheManyPropLoad(context.property, bc, parentId, context.parent.isReadOnly())) {
|
||||
final String parentKey = parentDesc.cacheKey(parentId);
|
||||
if (parentDesc.cacheManyPropLoad(context.property, bc, parentKey, context.parent.isReadOnly())) {
|
||||
// we loaded the bean collection from cache so remove it from the buffer
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
// find it using instance equality - avoiding equals() and potential deadlock issue
|
||||
|
||||
@@ -585,16 +585,11 @@ final class CQueryBuilder {
|
||||
}
|
||||
if (distinct && dbOrderBy != null) {
|
||||
// add the orderBy columns to the select clause (due to distinct)
|
||||
final OrderBy<?> orderBy = query.getOrderBy();
|
||||
if (orderBy != null && orderBy.supportsSelect()) {
|
||||
String trimmed = DbOrderByTrim.trim(dbOrderBy);
|
||||
if (query.isSingleAttribute() && select.selectSql().startsWith(trimmed)) {
|
||||
// NOP, already in SQL
|
||||
// TODO: what to do if we select("id").orderBy("prop,id")?
|
||||
// Can we live with a query like "select t0.id, t0.prop, t0.id from"
|
||||
// or should we elliminate the second "t0.id" from select
|
||||
} else {
|
||||
sb.append(", ").append(trimmed);
|
||||
String[] tokens = DbOrderByTrim.trim(dbOrderBy).split(",");
|
||||
for (String token : tokens) {
|
||||
token = token.trim();
|
||||
if (!DbOrderByTrim.contains(select.selectSql(), token)) {
|
||||
sb.append(", ").append(token);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -643,7 +638,7 @@ final class CQueryBuilder {
|
||||
private void appendHistoryAsOfPredicate() {
|
||||
if (query.isAsOfBaseTable()) {
|
||||
query.incrementAsOfTableCount();
|
||||
if (!historySupport.isStandardsBased()){
|
||||
if (!historySupport.isStandardsBased()) {
|
||||
appendAndOrWhere();
|
||||
sb.append(historySupport.asOfPredicate(request.baseTableAlias()));
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
final class DbOrderByTrim {
|
||||
|
||||
private static final Pattern orderByTrim = Pattern.compile("(?i) asc\\b| desc\\b|\\b nulls first\\b|\\b nulls last\\b");
|
||||
private static final Pattern orderByTrim = Pattern.compile("(?i) asc\\b| desc\\b| nulls first\\b| nulls last\\b");
|
||||
|
||||
/**
|
||||
* Convert the dbOrderBy clause to be safe for adding to select or distinct on.
|
||||
@@ -14,4 +14,21 @@ final class DbOrderByTrim {
|
||||
return orderByTrim.matcher(dbOrderBy).replaceAll("");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks, if <code>sql</code> contains the <code>column</code>.
|
||||
* <p>
|
||||
* SQL is normally comma separated: "t0.id, t1.id, t2.name"
|
||||
*/
|
||||
static boolean contains(String sql, String column) {
|
||||
if (sql.endsWith(column)) { // simplest way. sql ends with the column
|
||||
return true;
|
||||
} else if (sql.contains(column)) {
|
||||
// We need to check, if it is really the correct column,
|
||||
// sql="t0.name_short, t0.name_long" will match on column="t0.name"
|
||||
return sql.contains(column + ",");
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ public final class SqlTreeBuilder {
|
||||
String[] split = idCols.split(",");
|
||||
for (String col : split) {
|
||||
col = col.trim();
|
||||
if (!dbOrderBy.contains(col)) {
|
||||
if (!DbOrderByTrim.contains(dbOrderBy, col)) {
|
||||
sb.append(", ").append(col);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,4 +64,11 @@ public class DbOrderByTrimTest {
|
||||
assertEquals("foo", DbOrderByTrim.trim("foo desc nulls last"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void trim_nulls_withAggFunction() {
|
||||
assertEquals("min(customer)", DbOrderByTrim.trim("min(customer) asc nulls last"));
|
||||
assertEquals("foo,min(customer)", DbOrderByTrim.trim("foo,min(customer) asc nulls last"));
|
||||
assertEquals("bar,min(customer)", DbOrderByTrim.trim("bar desc,min(customer) asc nulls last"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-csv-reader</artifactId>
|
||||
@@ -14,21 +14,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean ddl generation</name>
|
||||
@@ -28,14 +28,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.model;
|
||||
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.DdlHelp;
|
||||
import io.ebeaninternal.dbmigration.migration.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -125,6 +126,21 @@ public class ModelDiff {
|
||||
// search for tables that are no longer used
|
||||
for (MTable existingTable : baseModel.getTables().values()) {
|
||||
if (!newTables.containsKey(existingTable.getName())) {
|
||||
// Compounded foreign keys used in many-to-many mapping tables
|
||||
existingTable.getCompoundKeys().forEach(it -> addAlterForeignKey(it.dropForeignKey(existingTable.getName())));
|
||||
// Foreign keys through direct mapping (oneToMany)
|
||||
existingTable.allColumns().stream()
|
||||
.filter(it -> it.getForeignKeyIndex() != null)
|
||||
.map(it -> {
|
||||
AlterForeignKey fk = new AlterForeignKey();
|
||||
fk.setName(it.getForeignKeyName());
|
||||
fk.setIndexName(it.getForeignKeyIndex());
|
||||
fk.setColumnNames(DdlHelp.DROP_FOREIGN_KEY);
|
||||
fk.setTableName(existingTable.getName());
|
||||
return fk;
|
||||
})
|
||||
.forEach(applyChanges::add);
|
||||
|
||||
addDropTable(existingTable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean external mapping api</name>
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>ebean-parent-13.11.1</tag>
|
||||
<tag>ebean-parent-13.11.2</tag>
|
||||
</scm>
|
||||
|
||||
<name>ebean external mapping xml</name>
|
||||
@@ -21,7 +21,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -54,21 +54,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-jackson-jsonnode</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1-SNAPSHOT</version>
|
||||
<version>13.11.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-kotlin</artifactId>
|
||||
@@ -28,7 +28,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1-SNAPSHOT</version>
|
||||
<version>13.11.2-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.11.1-SNAPSHOT</version>
|
||||
<version>13.11.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean postgis</name>
|
||||
@@ -22,14 +22,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- provided scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean querybean</name>
|
||||
@@ -17,7 +17,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -63,21 +63,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+6
-6
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
@@ -22,35 +22,35 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package org.domain;
|
||||
|
||||
import io.ebean.Model;
|
||||
import io.ebean.annotation.Cache;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
|
||||
@Cache
|
||||
@Entity
|
||||
public class UChild extends Model {
|
||||
|
||||
@Id
|
||||
long id;
|
||||
|
||||
String name;
|
||||
|
||||
@ManyToOne
|
||||
final UParent parent;
|
||||
|
||||
public UChild(UParent parent, String name) {
|
||||
this.parent = parent;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public long id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package org.domain;
|
||||
|
||||
import io.ebean.Model;
|
||||
import io.ebean.annotation.Cache;
|
||||
import io.ebean.annotation.CacheBeanTuning;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToMany;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Cache(enableQueryCache = true)
|
||||
@CacheBeanTuning(maxSecsToLive = 1)
|
||||
@Entity
|
||||
public class UParent extends Model {
|
||||
|
||||
@Id
|
||||
private UUID id;
|
||||
|
||||
private String name;
|
||||
|
||||
@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL)
|
||||
private final List<UChild> children = new ArrayList<>();
|
||||
|
||||
public UParent(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public UUID id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<UChild> children() {
|
||||
return children;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import io.ebean.cache.ServerCache;
|
||||
import io.ebean.cache.ServerCacheStatistics;
|
||||
import org.domain.Person;
|
||||
import org.domain.RCust;
|
||||
import org.domain.UChild;
|
||||
import org.domain.UParent;
|
||||
import org.domain.query.QPerson;
|
||||
import org.domain.query.QRCust;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -19,6 +21,32 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class IntegrationTest {
|
||||
|
||||
@Test
|
||||
void uuid_getPut() {
|
||||
UParent b0 = new UParent("b0");
|
||||
b0.children().add(new UChild(b0,"b0c0"));
|
||||
b0.children().add(new UChild(b0,"b0c1"));
|
||||
b0.save();
|
||||
|
||||
ServerCache beanCache = DB.cacheManager().beanCache(UParent.class);
|
||||
beanCache.clear();
|
||||
beanCache.statistics(true);
|
||||
|
||||
UParent found0 = DB.find(UParent.class, b0.id());
|
||||
assertThat(found0.name()).isEqualTo("b0");
|
||||
|
||||
List<UChild> children = found0.children();
|
||||
assertThat(children).hasSize(2);
|
||||
|
||||
UParent found1 = DB.find(UParent.class, b0.id());
|
||||
assertThat(found1.name()).isEqualTo("b0");
|
||||
|
||||
DB.delete(found1);
|
||||
|
||||
ServerCacheStatistics stats1 = beanCache.statistics(true);
|
||||
assertThat(stats1.getHitCount()).isEqualTo(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
void mget_when_emptyCollectionOfIds() {
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ ebean:
|
||||
dumpMetricsOnShutdown: true
|
||||
dumpMetricsOptions: sql,hash,loc
|
||||
test:
|
||||
registerTestTenantProvider: false
|
||||
redis: latest
|
||||
# shutdown: stop # stop | remove
|
||||
platform: h2 # h2, postgres, mysql, oracle, sqlserver, sqlite
|
||||
|
||||
+8
-8
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean test</name>
|
||||
@@ -28,20 +28,20 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -105,28 +105,28 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-joda-time</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-jsonnode</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.11.1</version>
|
||||
<version>13.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class YugabyteSetup implements PlatformSetup {
|
||||
if (!config.isUseDocker()) {
|
||||
return new Properties();
|
||||
}
|
||||
config.setDockerVersion("2.11.2.0-b89");
|
||||
config.setDockerVersion("2.16.0.1-b7");
|
||||
config.setExtensions("pgcrypto");
|
||||
return config.getDockerProperties();
|
||||
}
|
||||
|
||||
@@ -38,8 +38,10 @@ public class ProviderAutoConfig {
|
||||
|
||||
CurrentTenantProvider tenantProvider = config.getCurrentTenantProvider();
|
||||
if (tenantProvider == null) {
|
||||
providerSetFlag += 2;
|
||||
config.setCurrentTenantProvider(new WhoTenantProvider());
|
||||
if (Boolean.parseBoolean(properties.getProperty("ebean.test.registerTestTenantProvider", "true"))) {
|
||||
providerSetFlag += 2;
|
||||
config.setCurrentTenantProvider(new WhoTenantProvider());
|
||||
}
|
||||
}
|
||||
|
||||
EncryptKeyManager keyManager = config.getEncryptKeyManager();
|
||||
|
||||
@@ -236,7 +236,95 @@ public class DtoQuery2Test extends BaseTestCase {
|
||||
assertThat(stats).hasSize(2);
|
||||
|
||||
log.info("stats " + stats);
|
||||
}
|
||||
|
||||
@Test
|
||||
void dto_mapping_columnsWithUnderscores() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
List<DCustCamelCols0> list = server().findDto(DCustCamelCols0.class,
|
||||
"select id as num_with, name as name_for_me from o_customer")
|
||||
.findList();
|
||||
|
||||
assertThat(list).isNotEmpty();
|
||||
for (DCustCamelCols0 dto : list) {
|
||||
assertThat(dto.getNumWith()).isGreaterThan(0);
|
||||
assertThat(dto.getNameForMe()).isNotNull();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void dto_mapping_columnsWithNoUnderscores() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
List<DCustCamelCols0> list = server().findDto(DCustCamelCols0.class,
|
||||
"select id as numwith, name as nameforme from o_customer")
|
||||
.findList();
|
||||
|
||||
assertThat(list).isNotEmpty();
|
||||
for (DCustCamelCols0 dto : list) {
|
||||
assertThat(dto.getNumWith()).isGreaterThan(0);
|
||||
assertThat(dto.getNameForMe()).isNotNull();
|
||||
}
|
||||
|
||||
// mapping is case-insensitive
|
||||
List<DCustCamelCols0> list2 = server().findDto(DCustCamelCols0.class,
|
||||
"select id as numWith, name as nameForMe from o_customer")
|
||||
.findList();
|
||||
|
||||
assertThat(list2).isNotEmpty();
|
||||
for (DCustCamelCols0 dto : list2) {
|
||||
assertThat(dto.getNumWith()).isGreaterThan(0);
|
||||
assertThat(dto.getNameForMe()).isNotNull();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void dto_mapping_propertyNamesCaseInsensitive() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
List<DCustCamelCols2> list = server().findDto(DCustCamelCols2.class,
|
||||
"select id as numwith, name as nameforme from o_customer")
|
||||
.findList();
|
||||
|
||||
assertThat(list).isNotEmpty();
|
||||
for (DCustCamelCols2 dto : list) {
|
||||
assertThat(dto.getNumWITH()).isGreaterThan(0);
|
||||
assertThat(dto.getNameFORMe()).isNotNull();
|
||||
}
|
||||
|
||||
// mapping is case-insensitive
|
||||
List<DCustCamelCols2> list2 = server().findDto(DCustCamelCols2.class,
|
||||
"select id as numWith, name as nameForMe from o_customer")
|
||||
.findList();
|
||||
|
||||
assertThat(list2).isNotEmpty();
|
||||
for (DCustCamelCols2 dto : list2) {
|
||||
assertThat(dto.getNumWITH()).isGreaterThan(0);
|
||||
assertThat(dto.getNameFORMe()).isNotNull();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void dto_mapping_columnsUsingNestedSql() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
String sql
|
||||
= "select num_with, name_for_me from ( "
|
||||
// we don't CARE what the nested SQL is in that the jdbc metaData
|
||||
// for the column names/labels comes from the top most select
|
||||
+ " select id as num_with, name as name_for_me from o_customer "
|
||||
+ ") a";
|
||||
|
||||
List<DCustCamelCols0> list = server().findDto(DCustCamelCols0.class,
|
||||
sql)
|
||||
.findList();
|
||||
|
||||
assertThat(list).isNotEmpty();
|
||||
for (DCustCamelCols0 dto : list) {
|
||||
assertThat(dto.getNumWith()).isGreaterThan(0);
|
||||
assertThat(dto.getNameForMe()).isNotNull();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -478,4 +566,52 @@ public class DtoQuery2Test extends BaseTestCase {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
public static class DCustCamelCols0 {
|
||||
|
||||
Integer numWith;
|
||||
String nameForMe;
|
||||
|
||||
public Integer getNumWith() {
|
||||
return numWith;
|
||||
}
|
||||
|
||||
public DCustCamelCols0 setNumWith(Integer numWith) {
|
||||
this.numWith = numWith;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNameForMe() {
|
||||
return nameForMe;
|
||||
}
|
||||
|
||||
public DCustCamelCols0 setNameForMe(String nameForMe) {
|
||||
this.nameForMe = nameForMe;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class DCustCamelCols2 {
|
||||
|
||||
Integer numWITH;
|
||||
String nameFORMe;
|
||||
|
||||
public Integer getNumWITH() {
|
||||
return numWITH;
|
||||
}
|
||||
|
||||
public DCustCamelCols2 setNumWITH(Integer numWITH) {
|
||||
this.numWITH = numWITH;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNameFORMe() {
|
||||
return nameFORMe;
|
||||
}
|
||||
|
||||
public DCustCamelCols2 setNameFORMe(String nameFORMe) {
|
||||
this.nameFORMe = nameFORMe;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package misc.migration.v1_0;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Test-model referencing two other tables, which gets dropped for migration test in order to check for correct table drop
|
||||
* procedure (first drop foreign keys, then the tables).
|
||||
*
|
||||
* @author Jonas Pöhler, FOCONIS AG
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "drop_main")
|
||||
public class DropMain {
|
||||
|
||||
@Id
|
||||
Integer id;
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parent")
|
||||
List<DropRefOne> refsOne;
|
||||
|
||||
@ManyToMany(cascade = CascadeType.ALL)
|
||||
List<DropRefMany> refsMany;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public List<DropRefOne> getRefsOne() {
|
||||
return refsOne;
|
||||
}
|
||||
|
||||
public void setRefsOne(List<DropRefOne> refsOne) {
|
||||
this.refsOne = refsOne;
|
||||
}
|
||||
|
||||
public List<DropRefMany> getRefsMany() {
|
||||
return refsMany;
|
||||
}
|
||||
|
||||
public void setRefsMany(List<DropRefMany> refsMany) {
|
||||
this.refsMany = refsMany;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package misc.migration.v1_0;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
@Table(name = "drop_ref_many")
|
||||
public class DropRefMany {
|
||||
|
||||
@Id
|
||||
Integer id;
|
||||
|
||||
@ManyToMany(cascade = {}, mappedBy = "refsMany")
|
||||
List<DropMain> parents;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public List<DropMain> getParents() {
|
||||
return parents;
|
||||
}
|
||||
|
||||
public void setParents(List<DropMain> parents) {
|
||||
this.parents = parents;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package misc.migration.v1_0;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "drop_ref_one")
|
||||
public class DropRefOne {
|
||||
|
||||
@Id
|
||||
Integer id;
|
||||
|
||||
@ManyToOne(cascade = {})
|
||||
DropMain parent;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public DropMain getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public void setParent(DropMain parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
}
|
||||
+15
-3
@@ -70,19 +70,31 @@ public class TestBeanCache extends BaseTestCase {
|
||||
query.copy()
|
||||
.where().idIn(ids.subList(0, 1))
|
||||
.findMap(); // cache key is: 3/d[{/c1000}]/w[List[IdIn[?1],]]
|
||||
assertThat(LoggedSql.stop().get(0)).contains("in (?)");
|
||||
if (isPostgresCompatible()) {
|
||||
assertThat(LoggedSql.stop().get(0)).contains("t0.id = any(?)");
|
||||
} else {
|
||||
assertThat(LoggedSql.stop().get(0)).contains("in (?)");
|
||||
}
|
||||
|
||||
LoggedSql.start();
|
||||
query.copy()
|
||||
.where().idIn(ids.subList(0, 4))
|
||||
.findMap(); // cache key is: 3/d[{/c1000}]/w[List[IdIn[?5],]]
|
||||
assertThat(LoggedSql.stop().get(0)).contains("in (?,?,?,?,?)");
|
||||
if (isPostgresCompatible()) {
|
||||
assertThat(LoggedSql.stop().get(0)).contains("t0.id = any(?)");
|
||||
} else {
|
||||
assertThat(LoggedSql.stop().get(0)).contains("in (?,?,?,?,?)");
|
||||
}
|
||||
|
||||
LoggedSql.start();
|
||||
query.copy()
|
||||
.where().idIn(ids.subList(2, 6))
|
||||
.findMap(); // same cache key as above and same SQL above
|
||||
assertThat(LoggedSql.stop().get(0)).contains("in (?,?,?,?,?)");
|
||||
if (isPostgresCompatible()) {
|
||||
assertThat(LoggedSql.stop().get(0)).contains("t0.id = any(?)");
|
||||
} else {
|
||||
assertThat(LoggedSql.stop().get(0)).contains("in (?,?,?,?,?)");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -14,13 +14,12 @@ import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class TestCacheCollectionIds extends BaseTestCase {
|
||||
class TestCacheCollectionIds extends BaseTestCase {
|
||||
|
||||
private ServerCacheManager cacheManager = DB.cacheManager();
|
||||
private final ServerCacheManager cacheManager = DB.cacheManager();
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
void test() {
|
||||
ResetBasicData.reset();
|
||||
awaitL2Cache();
|
||||
|
||||
@@ -75,7 +74,6 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
}
|
||||
|
||||
private int fetchCustomer(Integer id) {
|
||||
|
||||
Customer customer2 = DB.find(Customer.class, id);
|
||||
|
||||
List<Contact> contacts2 = customer2.getContacts();
|
||||
@@ -91,7 +89,7 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
* When updating a ManyToMany relations also the collection cache must be updated.
|
||||
*/
|
||||
@Test
|
||||
public void testUpdatingCollectionCacheForManyToManyRelations() {
|
||||
void testUpdatingCollectionCacheForManyToManyRelations() {
|
||||
// arrange
|
||||
ResetBasicData.reset();
|
||||
|
||||
@@ -107,7 +105,7 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
dummyToLoad.getCountries().size();
|
||||
|
||||
ServerCache cachedBeanCountriesCache = cacheManager.collectionIdsCache(OCachedBean.class, "countries");
|
||||
CachedManyIds cachedManyIds = (CachedManyIds) cachedBeanCountriesCache.get(cachedBean.getId());
|
||||
CachedManyIds cachedManyIds = (CachedManyIds) cachedBeanCountriesCache.get(String.valueOf(cachedBean.getId()));
|
||||
|
||||
// confirm the starting data and cache entry
|
||||
assertEquals(2, dummyToLoad.getCountries().size());
|
||||
@@ -124,7 +122,7 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
|
||||
// Get the data to assert/check against
|
||||
OCachedBean result = DB.find(OCachedBean.class, cachedBean.getId());
|
||||
cachedManyIds = (CachedManyIds) cachedBeanCountriesCache.get(result.getId());
|
||||
cachedManyIds = (CachedManyIds) cachedBeanCountriesCache.get(String.valueOf(result.getId()));
|
||||
|
||||
// assert that data and cache both show correct data
|
||||
assertEquals(1, result.getCountries().size());
|
||||
@@ -134,7 +132,7 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChangingCollectionByEditingConnectedCachedBean() {
|
||||
void testChangingCollectionByEditingConnectedCachedBean() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
OCachedBean cachedBean = new OCachedBean();
|
||||
@@ -174,7 +172,7 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChangingCollectionByEditingConnectedNotCachedBean() {
|
||||
void testChangingCollectionByEditingConnectedNotCachedBean() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
OCachedBean cachedBean = new OCachedBean();
|
||||
@@ -213,13 +211,12 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
DB.delete(cachedBean);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* When updating a ManyToMany relations also the collection cache must be updated.
|
||||
* Alternate to above test where in this case the bean is dirty - loadedBean.setName("goodbye");.
|
||||
*/
|
||||
@Test
|
||||
public void testUpdatingCollectionCacheForManyToManyRelationsWithUpdatedBean() {
|
||||
void testUpdatingCollectionCacheForManyToManyRelationsWithUpdatedBean() {
|
||||
// arrange
|
||||
ResetBasicData.reset();
|
||||
|
||||
@@ -235,7 +232,7 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
dummyToLoad.getCountries().size();
|
||||
|
||||
ServerCache cachedBeanCountriesCache = cacheManager.collectionIdsCache(OCachedBean.class, "countries");
|
||||
CachedManyIds cachedManyIds = (CachedManyIds) cachedBeanCountriesCache.get(cachedBean.getId());
|
||||
CachedManyIds cachedManyIds = (CachedManyIds) cachedBeanCountriesCache.get(String.valueOf(cachedBean.getId()));
|
||||
|
||||
// confirm the starting data and cache entry
|
||||
assertEquals(2, dummyToLoad.getCountries().size());
|
||||
@@ -253,7 +250,7 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
|
||||
// Get the data to assert/check against
|
||||
OCachedBean result = DB.find(OCachedBean.class, cachedBean.getId());
|
||||
cachedManyIds = (CachedManyIds) cachedBeanCountriesCache.get(result.getId());
|
||||
cachedManyIds = (CachedManyIds) cachedBeanCountriesCache.get(String.valueOf(result.getId()));
|
||||
|
||||
// assert that data and cache both show correct data
|
||||
assertEquals(1, result.getCountries().size());
|
||||
@@ -266,7 +263,7 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
* When updating a ManyToMany relations also the collection cache must be updated.
|
||||
*/
|
||||
@Test
|
||||
public void testUpdatingCollectionCacheForManyToManyRelationsWithinStatelessUpdate() {
|
||||
void testUpdatingCollectionCacheForManyToManyRelationsWithinStatelessUpdate() {
|
||||
// arrange
|
||||
ResetBasicData.reset();
|
||||
|
||||
@@ -289,7 +286,7 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
|
||||
// assert that the cache contains the expected entry
|
||||
assertEquals(1, cachedBeanCountriesCache.size());
|
||||
CachedManyIds dummyEntry = (CachedManyIds) cachedBeanCountriesCache.get(dummyLoad.getId());
|
||||
CachedManyIds dummyEntry = (CachedManyIds) cachedBeanCountriesCache.get(String.valueOf(dummyLoad.getId()));
|
||||
assertNotNull(dummyEntry);
|
||||
assertEquals(2, dummyEntry.getIdList().size());
|
||||
assertTrue(dummyEntry.getIdList().contains("NZ"));
|
||||
@@ -307,7 +304,7 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
|
||||
assertEquals(1, cachedBeanCountriesCache.size());
|
||||
|
||||
CachedManyIds cachedManyIds = (CachedManyIds) cachedBeanCountriesCache.get(update.getId());
|
||||
CachedManyIds cachedManyIds = (CachedManyIds) cachedBeanCountriesCache.get(String.valueOf(update.getId()));
|
||||
|
||||
// assert cache updated
|
||||
assertEquals(1, cachedManyIds.getIdList().size());
|
||||
@@ -321,8 +318,7 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdating_noChange() throws InterruptedException {
|
||||
|
||||
void testUpdating_noChange() throws InterruptedException {
|
||||
ResetBasicData.reset();
|
||||
|
||||
try (Transaction txn = DB.beginTransaction()) {
|
||||
@@ -355,7 +351,7 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
*/
|
||||
@Test
|
||||
@Disabled
|
||||
public void testClearingCollectionCacheOnORMUpdate() {
|
||||
void testClearingCollectionCacheOnORMUpdate() {
|
||||
// arrange
|
||||
ResetBasicData.reset();
|
||||
|
||||
@@ -390,7 +386,7 @@ public class TestCacheCollectionIds extends BaseTestCase {
|
||||
*/
|
||||
@Test
|
||||
@Disabled
|
||||
public void testClearingCollectionCacheOnExternalModification() {
|
||||
void testClearingCollectionCacheOnExternalModification() {
|
||||
// arrange
|
||||
ResetBasicData.reset();
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.tests.idkeys;
|
||||
|
||||
import io.ebean.DB;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.idkeys.db.EaObject;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class TestEaObject extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
void insert() {
|
||||
EaObject bean = new EaObject("fred");
|
||||
DB.save(bean);
|
||||
assertThat(bean.id()).isGreaterThan(0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.tests.idkeys.db;
|
||||
|
||||
import io.ebean.Model;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@Entity
|
||||
@Table(name = "ea_object")
|
||||
public class EaObject extends Model {
|
||||
|
||||
@Id
|
||||
@Column(name = "object_id", nullable = false)
|
||||
@GeneratedValue(
|
||||
strategy = GenerationType.AUTO,
|
||||
generator = "t_object_sequence_generator"
|
||||
)
|
||||
@SequenceGenerator(
|
||||
name = "t_object_sequence_generator",
|
||||
sequenceName = "object_id_seq"
|
||||
)
|
||||
long id;
|
||||
|
||||
final String name;
|
||||
|
||||
public EaObject(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public long id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package org.tests.model.basic;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OrderBy;
|
||||
import javax.persistence.Table;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
@Table(name = "e_basic_tree")
|
||||
public class EBasicTree {
|
||||
|
||||
@Id
|
||||
private int id;
|
||||
|
||||
@ManyToOne
|
||||
private EBasicTree parent;
|
||||
|
||||
@OneToMany
|
||||
@OrderBy("ref.name")
|
||||
private List<EBasicTree> children;
|
||||
|
||||
@ManyToOne
|
||||
private EBasic ref;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public EBasicTree getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public void setParent(EBasicTree parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public List<EBasicTree> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<EBasicTree> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public EBasic getRef() {
|
||||
return ref;
|
||||
}
|
||||
|
||||
public void setRef(EBasic ref) {
|
||||
this.ref = ref;
|
||||
}
|
||||
}
|
||||
@@ -149,9 +149,9 @@ public class TestAggregationCount extends BaseTestCase {
|
||||
|
||||
String sql = sqlOf(query, 5);
|
||||
if (isH2()) {
|
||||
assertThat(sql).contains("select distinct t0.id, t0.name, count(u1.id), sum(u1.my_units), sum(u1.my_units * u1.amount), sum(u1.my_units), t0.name from tevent_one t0 ");
|
||||
assertThat(sql).contains("select distinct t0.id, t0.name, count(u1.id), sum(u1.my_units), sum(u1.my_units * u1.amount) from tevent_one t0 ");
|
||||
} else if (isPostgresCompatible()) {
|
||||
assertThat(sql).contains("t0.name, count(u1.id), sum(u1.my_units), sum(u1.my_units * u1.amount), sum(u1.my_units), t0.name from tevent_one t0 ");
|
||||
assertThat(sql).contains("t0.name, count(u1.id), sum(u1.my_units), sum(u1.my_units * u1.amount) from tevent_one t0 ");
|
||||
}
|
||||
assertThat(sql).contains("from tevent_one t0 join tevent_many u1 on u1.event_id = t0.id ");
|
||||
assertThat(sql).contains(" group by t0.id, t0.name ");
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
package org.tests.query.orderby;
|
||||
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.Query;
|
||||
import io.ebean.xtest.IgnorePlatform;
|
||||
import io.ebean.annotation.Platform;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import io.ebean.xtest.IgnorePlatform;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.*;
|
||||
import org.tests.model.basic.Customer;
|
||||
import org.tests.model.basic.EBasic;
|
||||
import org.tests.model.basic.EBasicTree;
|
||||
import org.tests.model.basic.MRole;
|
||||
import org.tests.model.basic.MUser;
|
||||
import org.tests.model.basic.MUserType;
|
||||
import org.tests.model.basic.ResetBasicData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -57,6 +63,30 @@ public class TestOrderByWithDistinct extends BaseTestCase {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOrderByOnPropWithDistinct() {
|
||||
Query<EBasicTree> query = DB.find(EBasicTree.class)
|
||||
.fetch("children")
|
||||
.where().eq("children.ref.status", EBasic.Status.ACTIVE).query();
|
||||
|
||||
query.findList();
|
||||
// we expect t2.name in this query
|
||||
if (platformDistinctOn()) {
|
||||
assertSql(query).startsWith("select distinct on (t0.id, t2.name, t1.id) t0.id, t0.parent_id, t0.ref_id, t1.id, t1.parent_id, t1.ref_id, t2.name "
|
||||
+ "from e_basic_tree t0 "
|
||||
+ "left join e_basic_tree t1 on t1.parent_id = t0.id "
|
||||
+ "join e_basic_tree u1 on u1.parent_id = t0.id "
|
||||
+ "join e_basic u2 on u2.id = u1.ref_id left "
|
||||
+ "join e_basic t2 on t2.id = t1.ref_id where u2.status = ? order by t0.id, t2.name");
|
||||
} else {
|
||||
assertSql(query).startsWith("select distinct t0.id, t0.parent_id, t0.ref_id, t1.id, t1.parent_id, t1.ref_id, t2.name "
|
||||
+ "from e_basic_tree t0 "
|
||||
+ "left join e_basic_tree t1 on t1.parent_id = t0.id "
|
||||
+ "join e_basic_tree u1 on u1.parent_id = t0.id "
|
||||
+ "join e_basic u2 on u2.id = u1.ref_id left "
|
||||
+ "join e_basic t2 on t2.id = t1.ref_id where u2.status = ? order by t0.id, t2.name");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOrderByWithDistinct() {
|
||||
@@ -72,9 +102,9 @@ public class TestOrderByWithDistinct extends BaseTestCase {
|
||||
assertSql(query).contains("from muser t0 limit 1000");
|
||||
}
|
||||
query = DB.find(MUser.class)
|
||||
.where()
|
||||
.eq("roles.roleName", "A")
|
||||
.query();
|
||||
.where()
|
||||
.eq("roles.roleName", "A")
|
||||
.query();
|
||||
query.findList();
|
||||
assertSql(query).doesNotContain("order by");
|
||||
assertSql(query).contains("select distinct");
|
||||
@@ -89,12 +119,12 @@ public class TestOrderByWithDistinct extends BaseTestCase {
|
||||
@Test
|
||||
public void test() {
|
||||
/*
|
||||
* Original conversation:
|
||||
* https://groups.google.com/forum/?fromgroups=#!topic/ebean/uuvi1btdCDQ%5B1-25-false%5D
|
||||
*
|
||||
* This test exposes what may be a general problem with columns required by the order by phrase being omitted from the select.
|
||||
* I'm not sure this exposes all causes of the problem.
|
||||
*/
|
||||
* Original conversation:
|
||||
* https://groups.google.com/forum/?fromgroups=#!topic/ebean/uuvi1btdCDQ%5B1-25-false%5D
|
||||
*
|
||||
* This test exposes what may be a general problem with columns required by the order by phrase being omitted from the select.
|
||||
* I'm not sure this exposes all causes of the problem.
|
||||
*/
|
||||
|
||||
MUserType ut = new MUserType("md");
|
||||
DB.save(ut);
|
||||
|
||||
@@ -60,9 +60,9 @@ public class TestOrderByWithDistinctTake2 extends BaseTestCase {
|
||||
String generatedSql = sqlOf(query);
|
||||
|
||||
if (platformDistinctOn()) {
|
||||
assertThat(generatedSql).contains("select distinct on (t0.name, t0.id) t0.id, t0.name, t0.id");
|
||||
assertThat(generatedSql).contains("select distinct on (t0.name, t0.id) t0.id, t0.name");
|
||||
} else {
|
||||
assertThat(generatedSql).contains("select distinct t0.id, t0.name, t0.id");
|
||||
assertThat(generatedSql).contains("select distinct t0.id, t0.name");
|
||||
}
|
||||
assertThat(generatedSql).contains("order by t0.name, t0.id desc");
|
||||
assertThat(generatedSql).contains("from o_customer t0 join contact u1 on u1.customer_id = t0.id");
|
||||
|
||||
@@ -20,7 +20,6 @@ public class TestOrderByParse extends BaseTestCase {
|
||||
assertTrue(o1.getProperties().get(0).isAscending());
|
||||
assertThat(o1.toStringFormat()).isEqualTo("case when status='N' then 1 when status='F' then 2 else 99 end");
|
||||
assertThat(o1.getProperties().get(0).getProperty()).isEqualTo("case when status='N' then 1 when status='F' then 2 else 99 end");
|
||||
assertTrue(o1.supportsSelect());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -31,7 +30,6 @@ public class TestOrderByParse extends BaseTestCase {
|
||||
assertEquals("id", o1.getProperties().get(0).getProperty());
|
||||
assertTrue(o1.getProperties().get(0).isAscending());
|
||||
assertEquals("id", o1.toStringFormat());
|
||||
assertTrue(o1.supportsSelect());
|
||||
|
||||
o1 = new OrderBy<>("id asc");
|
||||
assertEquals(1, o1.getProperties().size());
|
||||
@@ -63,7 +61,6 @@ public class TestOrderByParse extends BaseTestCase {
|
||||
assertEquals("id", o1.getProperties().get(0).getProperty());
|
||||
assertFalse(o1.getProperties().get(0).isAscending());
|
||||
assertEquals("id desc nulls high", o1.toStringFormat());
|
||||
assertFalse(o1.supportsSelect());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -99,7 +96,6 @@ public class TestOrderByParse extends BaseTestCase {
|
||||
assertEquals("name", o1.getProperties().get(1).getProperty());
|
||||
assertTrue(o1.getProperties().get(1).isAscending());
|
||||
assertEquals("id, name", o1.toStringFormat());
|
||||
assertTrue(o1.supportsSelect());
|
||||
|
||||
o1 = new OrderBy<>(" id , name ");
|
||||
assertEquals(2, o1.getProperties().size());
|
||||
@@ -178,7 +174,6 @@ public class TestOrderByParse extends BaseTestCase {
|
||||
assertEquals("id", o1.getProperties().get(0).getProperty());
|
||||
assertTrue(o1.getProperties().get(0).isAscending());
|
||||
assertEquals("id collate latin_1", o1.toStringFormat());
|
||||
assertTrue(o1.supportsSelect());
|
||||
|
||||
o1 = new OrderBy<>();
|
||||
o1.desc("id", "latin_1");
|
||||
@@ -186,7 +181,6 @@ public class TestOrderByParse extends BaseTestCase {
|
||||
assertEquals("id", o1.getProperties().get(0).getProperty());
|
||||
assertFalse(o1.getProperties().get(0).isAscending());
|
||||
assertEquals("id collate latin_1 desc", o1.toStringFormat());
|
||||
assertTrue(o1.supportsSelect());
|
||||
|
||||
o1 = new OrderBy<>();
|
||||
o1.desc("id", "latin_1");
|
||||
@@ -197,7 +191,6 @@ public class TestOrderByParse extends BaseTestCase {
|
||||
assertFalse(o1.getProperties().get(0).isAscending());
|
||||
assertTrue(o1.getProperties().get(1).isAscending());
|
||||
assertEquals("id collate latin_1 desc, date", o1.toStringFormat());
|
||||
assertTrue(o1.supportsSelect());
|
||||
|
||||
o1 = new OrderBy<>();
|
||||
o1.desc("id", "latin_1");
|
||||
@@ -208,7 +201,6 @@ public class TestOrderByParse extends BaseTestCase {
|
||||
assertFalse(o1.getProperties().get(0).isAscending());
|
||||
assertTrue(o1.getProperties().get(1).isAscending());
|
||||
assertEquals("id collate latin_1 desc, name collate latin_2", o1.toStringFormat());
|
||||
assertTrue(o1.supportsSelect());
|
||||
|
||||
// functional (DB2) syntax
|
||||
o1 = new OrderBy<>();
|
||||
@@ -217,7 +209,6 @@ public class TestOrderByParse extends BaseTestCase {
|
||||
assertEquals("id", o1.getProperties().get(0).getProperty());
|
||||
assertFalse(o1.getProperties().get(0).isAscending());
|
||||
assertEquals("COLLATION_KEY(id, 'latin_1') desc", o1.toStringFormat());
|
||||
assertTrue(o1.supportsSelect());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -45,6 +45,24 @@ create table migtest_fk_set_null (
|
||||
one_id UInt64
|
||||
) ENGINE = Log();
|
||||
|
||||
create table drop_main (
|
||||
id UInt32
|
||||
) ENGINE = Log();
|
||||
|
||||
create table drop_main_drop_ref_many (
|
||||
drop_main_id UInt32,
|
||||
drop_ref_many_id UInt32
|
||||
) ENGINE = Log();
|
||||
|
||||
create table drop_ref_many (
|
||||
id UInt32
|
||||
) ENGINE = Log();
|
||||
|
||||
create table drop_ref_one (
|
||||
id UInt32,
|
||||
parent_id UInt32
|
||||
) ENGINE = Log();
|
||||
|
||||
create table migtest_e_basic (
|
||||
id UInt32,
|
||||
status String,
|
||||
|
||||
+4
@@ -7,5 +7,9 @@ alter table migtest_e_basic drop column eref_id;
|
||||
alter table migtest_e_history2 drop column obsolete_string1;
|
||||
alter table migtest_e_history2 drop column obsolete_string2;
|
||||
-- apply post alter
|
||||
drop table if exists drop_main;
|
||||
drop table if exists drop_main_drop_ref_many;
|
||||
drop table if exists drop_ref_many;
|
||||
drop table if exists drop_ref_one;
|
||||
drop table if exists "migtest_QuOtEd";
|
||||
drop table if exists migtest_e_ref;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
193400547, 1.0__initial.sql
|
||||
1672735407, 1.0__initial.sql
|
||||
540706946, 1.1.sql
|
||||
688811494, 1.2__dropsFor_1.1.sql
|
||||
-875723380, 1.2__dropsFor_1.1.sql
|
||||
1015552567, 1.3.sql
|
||||
255653518, 1.4__dropsFor_1.3.sql
|
||||
|
||||
|
||||
@@ -54,6 +54,28 @@ create table migtest_fk_set_null (
|
||||
constraint pk_migtest_fk_set_null primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main (
|
||||
id integer generated by default as identity not null,
|
||||
constraint pk_drop_main primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main_drop_ref_many (
|
||||
drop_main_id integer not null,
|
||||
drop_ref_many_id integer not null,
|
||||
constraint pk_drop_main_drop_ref_many primary key (drop_main_id,drop_ref_many_id)
|
||||
);
|
||||
|
||||
create table drop_ref_many (
|
||||
id integer generated by default as identity not null,
|
||||
constraint pk_drop_ref_many primary key (id)
|
||||
);
|
||||
|
||||
create table drop_ref_one (
|
||||
id integer generated by default as identity not null,
|
||||
parent_id integer,
|
||||
constraint pk_drop_ref_one primary key (id)
|
||||
);
|
||||
|
||||
create table migtest_e_basic (
|
||||
id integer generated by default as identity not null,
|
||||
status varchar(1),
|
||||
@@ -193,6 +215,15 @@ alter table migtest_fk_cascade add constraint fk_migtest_fk_cascade_one_id forei
|
||||
create index ix_migtest_fk_set_null_one_id on migtest_fk_set_null (one_id);
|
||||
alter table migtest_fk_set_null add constraint fk_migtest_fk_set_null_one_id foreign key (one_id) references migtest_fk_one (id) on delete set null on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_main on drop_main_drop_ref_many (drop_main_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_main foreign key (drop_main_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_ref_many on drop_main_drop_ref_many (drop_ref_many_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_ref_many foreign key (drop_ref_many_id) references drop_ref_many (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_ref_one_parent_id on drop_ref_one (parent_id);
|
||||
alter table drop_ref_one add constraint fk_drop_ref_one_parent_id foreign key (parent_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_migtest_e_basic_eref_id on migtest_e_basic (eref_id);
|
||||
alter table migtest_e_basic add constraint fk_migtest_e_basic_eref_id foreign key (eref_id) references migtest_e_ref (id) on delete restrict on update restrict;
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@ alter table migtest_e_basic drop constraint if exists ck_migtest_e_basic_status2
|
||||
drop index uq_migtest_e_basic_indextest2 cascade;
|
||||
drop index uq_migtest_e_basic_indextest6 cascade;
|
||||
alter table migtest_e_enum drop constraint if exists ck_migtest_e_enum_test_status;
|
||||
alter table if exists drop_main_drop_ref_many drop constraint if exists fk_drop_main_drop_ref_many_drop_main;
|
||||
alter table if exists drop_main_drop_ref_many drop constraint if exists fk_drop_main_drop_ref_many_drop_ref_many;
|
||||
alter table if exists drop_ref_one drop constraint if exists fk_drop_ref_one_parent_id;
|
||||
drop index if exists ix_migtest_e_basic_indextest1;
|
||||
drop index if exists ix_migtest_e_basic_indextest5;
|
||||
drop index if exists ix_migtest_quoted_status1;
|
||||
|
||||
+7
@@ -7,6 +7,13 @@ alter table migtest_e_basic drop column eref_id;
|
||||
alter table migtest_e_history2 drop column obsolete_string1;
|
||||
alter table migtest_e_history2 drop column obsolete_string2;
|
||||
-- apply post alter
|
||||
drop table if exists drop_main cascade;
|
||||
drop sequence if exists drop_main_seq;
|
||||
drop table if exists drop_main_drop_ref_many cascade;
|
||||
drop table if exists drop_ref_many cascade;
|
||||
drop sequence if exists drop_ref_many_seq;
|
||||
drop table if exists drop_ref_one cascade;
|
||||
drop sequence if exists drop_ref_one_seq;
|
||||
drop table if exists "migtest_QuOtEd" cascade;
|
||||
drop table if exists migtest_e_ref cascade;
|
||||
drop sequence if exists migtest_e_ref_seq;
|
||||
|
||||
@@ -14,6 +14,11 @@ drop index uq_migtest_e_basic_name cascade;
|
||||
drop index uq_migtest_e_basic_indextest4 cascade;
|
||||
drop index uq_migtest_e_basic_indextest5 cascade;
|
||||
alter table migtest_e_enum drop constraint if exists ck_migtest_e_enum_test_status;
|
||||
alter table if exists migtest_mtm_c_migtest_mtm_m drop constraint if exists fk_migtest_mtm_c_migtest_mtm_m_migtest_mtm_c;
|
||||
alter table if exists migtest_mtm_c_migtest_mtm_m drop constraint if exists fk_migtest_mtm_c_migtest_mtm_m_migtest_mtm_m;
|
||||
alter table if exists migtest_mtm_m_migtest_mtm_c drop constraint if exists fk_migtest_mtm_m_migtest_mtm_c_migtest_mtm_m;
|
||||
alter table if exists migtest_mtm_m_migtest_mtm_c drop constraint if exists fk_migtest_mtm_m_migtest_mtm_c_migtest_mtm_c;
|
||||
alter table if exists migtest_mtm_m_phone_numbers drop constraint if exists fk_migtest_mtm_m_phone_numbers_migtest_mtm_m_id;
|
||||
drop index if exists ix_migtest_e_basic_indextest3;
|
||||
drop index if exists ix_migtest_e_basic_indextest6;
|
||||
drop index if exists ix_table_textfield2;
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
1434934404, 1.0__initial.sql
|
||||
1284257915, 1.1.sql
|
||||
856096334, 1.2__dropsFor_1.1.sql
|
||||
-1551362011, 1.3.sql
|
||||
1867456246, 1.0__initial.sql
|
||||
-412570267, 1.1.sql
|
||||
395394572, 1.2__dropsFor_1.1.sql
|
||||
-861259583, 1.3.sql
|
||||
-971909974, 1.4__dropsFor_1.3.sql
|
||||
561281075, R__order_views.sql
|
||||
|
||||
|
||||
@@ -54,6 +54,28 @@ create table migtest_fk_set_null (
|
||||
constraint pk_migtest_fk_set_null primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main (
|
||||
id integer generated by default as identity not null,
|
||||
constraint pk_drop_main primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main_drop_ref_many (
|
||||
drop_main_id integer not null,
|
||||
drop_ref_many_id integer not null,
|
||||
constraint pk_drop_main_drop_ref_many primary key (drop_main_id,drop_ref_many_id)
|
||||
);
|
||||
|
||||
create table drop_ref_many (
|
||||
id integer generated by default as identity not null,
|
||||
constraint pk_drop_ref_many primary key (id)
|
||||
);
|
||||
|
||||
create table drop_ref_one (
|
||||
id integer generated by default as identity not null,
|
||||
parent_id integer,
|
||||
constraint pk_drop_ref_one primary key (id)
|
||||
);
|
||||
|
||||
create table migtest_e_basic (
|
||||
id integer generated by default as identity not null,
|
||||
status varchar(1),
|
||||
@@ -232,6 +254,15 @@ alter table migtest_fk_cascade add constraint fk_migtest_fk_cascade_one_id forei
|
||||
create index ix_migtest_fk_set_null_one_id on migtest_fk_set_null (one_id);
|
||||
alter table migtest_fk_set_null add constraint fk_migtest_fk_set_null_one_id foreign key (one_id) references migtest_fk_one (id) on delete set null on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_main on drop_main_drop_ref_many (drop_main_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_main foreign key (drop_main_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_ref_many on drop_main_drop_ref_many (drop_ref_many_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_ref_many foreign key (drop_ref_many_id) references drop_ref_many (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_ref_one_parent_id on drop_ref_one (parent_id);
|
||||
alter table drop_ref_one add constraint fk_drop_ref_one_parent_id foreign key (parent_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_migtest_e_basic_eref_id on migtest_e_basic (eref_id);
|
||||
alter table migtest_e_basic add constraint fk_migtest_e_basic_eref_id foreign key (eref_id) references migtest_e_ref (id) on delete restrict on update restrict;
|
||||
|
||||
|
||||
@@ -65,6 +65,27 @@ end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_DROP_MAIN_DROP_REF_MANY_DROP_MAIN' and ucase(tabname) = 'DROP_MAIN_DROP_REF_MANY') then
|
||||
prepare stmt from 'alter table drop_main_drop_ref_many drop constraint fk_drop_main_drop_ref_many_drop_main';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_DROP_MAIN_DROP_REF_MANY_DROP_REF_MANY' and ucase(tabname) = 'DROP_MAIN_DROP_REF_MANY') then
|
||||
prepare stmt from 'alter table drop_main_drop_ref_many drop constraint fk_drop_main_drop_ref_many_drop_ref_many';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_DROP_REF_ONE_PARENT_ID' and ucase(tabname) = 'DROP_REF_ONE') then
|
||||
prepare stmt from 'alter table drop_ref_one drop constraint fk_drop_ref_one_parent_id';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select indname from syscat.indexes where indschema = current_schema and ucase(indname) = 'IX_MIGTEST_E_BASIC_INDEXTEST1') then
|
||||
prepare stmt from 'drop index ix_migtest_e_basic_indextest1';
|
||||
execute stmt;
|
||||
|
||||
@@ -15,6 +15,31 @@ alter table migtest_e_history2_history drop column obsolete_string2;
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history2_history');
|
||||
-- apply post alter
|
||||
alter table migtest_e_history2 add versioning use history table migtest_e_history2_history;
|
||||
drop table drop_main;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select seqschema from syscat.sequences where seqschema = current_schema and ucase(seqname) = 'DROP_MAIN_SEQ') then
|
||||
prepare stmt from 'drop sequence drop_main_seq';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
drop table drop_main_drop_ref_many;
|
||||
drop table drop_ref_many;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select seqschema from syscat.sequences where seqschema = current_schema and ucase(seqname) = 'DROP_REF_MANY_SEQ') then
|
||||
prepare stmt from 'drop sequence drop_ref_many_seq';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
drop table drop_ref_one;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select seqschema from syscat.sequences where seqschema = current_schema and ucase(seqname) = 'DROP_REF_ONE_SEQ') then
|
||||
prepare stmt from 'drop sequence drop_ref_one_seq';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
drop table "migtest_QuOtEd";
|
||||
drop table migtest_e_ref;
|
||||
delimiter $$
|
||||
|
||||
@@ -135,6 +135,41 @@ end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_C_MIGTEST_MTM_M_MIGTEST_MTM_C' and ucase(tabname) = 'MIGTEST_MTM_C_MIGTEST_MTM_M') then
|
||||
prepare stmt from 'alter table migtest_mtm_c_migtest_mtm_m drop constraint fk_migtest_mtm_c_migtest_mtm_m_migtest_mtm_c';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_C_MIGTEST_MTM_M_MIGTEST_MTM_M' and ucase(tabname) = 'MIGTEST_MTM_C_MIGTEST_MTM_M') then
|
||||
prepare stmt from 'alter table migtest_mtm_c_migtest_mtm_m drop constraint fk_migtest_mtm_c_migtest_mtm_m_migtest_mtm_m';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_M_MIGTEST_MTM_C_MIGTEST_MTM_M' and ucase(tabname) = 'MIGTEST_MTM_M_MIGTEST_MTM_C') then
|
||||
prepare stmt from 'alter table migtest_mtm_m_migtest_mtm_c drop constraint fk_migtest_mtm_m_migtest_mtm_c_migtest_mtm_m';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_M_MIGTEST_MTM_C_MIGTEST_MTM_C' and ucase(tabname) = 'MIGTEST_MTM_M_MIGTEST_MTM_C') then
|
||||
prepare stmt from 'alter table migtest_mtm_m_migtest_mtm_c drop constraint fk_migtest_mtm_m_migtest_mtm_c_migtest_mtm_c';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_M_PHONE_NUMBERS_MIGTEST_MTM_M_ID' and ucase(tabname) = 'MIGTEST_MTM_M_PHONE_NUMBERS') then
|
||||
prepare stmt from 'alter table migtest_mtm_m_phone_numbers drop constraint fk_migtest_mtm_m_phone_numbers_migtest_mtm_m_id';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select indname from syscat.indexes where indschema = current_schema and ucase(indname) = 'IX_MIGTEST_E_BASIC_INDEXTEST3') then
|
||||
prepare stmt from 'drop index ix_migtest_e_basic_indextest3';
|
||||
execute stmt;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-1467839063, 1.0__initial.sql
|
||||
-184000413, 1.1.sql
|
||||
-1187336846, 1.2__dropsFor_1.1.sql
|
||||
-150875853, 1.3.sql
|
||||
-283216660, 1.0__initial.sql
|
||||
1120848440, 1.1.sql
|
||||
135256939, 1.2__dropsFor_1.1.sql
|
||||
-2139056187, 1.3.sql
|
||||
946163478, 1.4__dropsFor_1.3.sql
|
||||
561281075, R__order_views.sql
|
||||
|
||||
|
||||
@@ -54,6 +54,28 @@ create table migtest_fk_set_null (
|
||||
constraint pk_migtest_fk_set_null primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main (
|
||||
id integer auto_increment not null,
|
||||
constraint pk_drop_main primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main_drop_ref_many (
|
||||
drop_main_id integer not null,
|
||||
drop_ref_many_id integer not null,
|
||||
constraint pk_drop_main_drop_ref_many primary key (drop_main_id,drop_ref_many_id)
|
||||
);
|
||||
|
||||
create table drop_ref_many (
|
||||
id integer auto_increment not null,
|
||||
constraint pk_drop_ref_many primary key (id)
|
||||
);
|
||||
|
||||
create table drop_ref_one (
|
||||
id integer auto_increment not null,
|
||||
parent_id integer,
|
||||
constraint pk_drop_ref_one primary key (id)
|
||||
);
|
||||
|
||||
create table migtest_e_basic (
|
||||
id integer auto_increment not null,
|
||||
status varchar(1),
|
||||
@@ -194,6 +216,15 @@ alter table migtest_fk_cascade add constraint fk_migtest_fk_cascade_one_id forei
|
||||
create index ix_migtest_fk_set_null_one_id on migtest_fk_set_null (one_id);
|
||||
alter table migtest_fk_set_null add constraint fk_migtest_fk_set_null_one_id foreign key (one_id) references migtest_fk_one (id) on delete set null on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_main on drop_main_drop_ref_many (drop_main_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_main foreign key (drop_main_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_ref_many on drop_main_drop_ref_many (drop_ref_many_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_ref_many foreign key (drop_ref_many_id) references drop_ref_many (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_ref_one_parent_id on drop_ref_one (parent_id);
|
||||
alter table drop_ref_one add constraint fk_drop_ref_one_parent_id foreign key (parent_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_migtest_e_basic_eref_id on migtest_e_basic (eref_id);
|
||||
alter table migtest_e_basic add constraint fk_migtest_e_basic_eref_id foreign key (eref_id) references migtest_e_ref (id) on delete restrict on update restrict;
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@ alter table migtest_e_basic drop constraint if exists ck_migtest_e_basic_status2
|
||||
alter table migtest_e_basic drop constraint uq_migtest_e_basic_indextest2;
|
||||
alter table migtest_e_basic drop constraint uq_migtest_e_basic_indextest6;
|
||||
alter table migtest_e_enum drop constraint if exists ck_migtest_e_enum_test_status;
|
||||
alter table drop_main_drop_ref_many drop constraint if exists fk_drop_main_drop_ref_many_drop_main;
|
||||
alter table drop_main_drop_ref_many drop constraint if exists fk_drop_main_drop_ref_many_drop_ref_many;
|
||||
alter table drop_ref_one drop constraint if exists fk_drop_ref_one_parent_id;
|
||||
drop index if exists ix_migtest_e_basic_indextest1;
|
||||
drop index if exists ix_migtest_e_basic_indextest5;
|
||||
drop index if exists ix_migtest_quoted_status1;
|
||||
|
||||
+4
@@ -7,5 +7,9 @@ alter table migtest_e_basic drop column eref_id;
|
||||
alter table migtest_e_history2 drop column obsolete_string1;
|
||||
alter table migtest_e_history2 drop column obsolete_string2;
|
||||
-- apply post alter
|
||||
drop table if exists drop_main;
|
||||
drop table if exists drop_main_drop_ref_many;
|
||||
drop table if exists drop_ref_many;
|
||||
drop table if exists drop_ref_one;
|
||||
drop table if exists "migtest_QuOtEd";
|
||||
drop table if exists migtest_e_ref;
|
||||
|
||||
@@ -14,6 +14,11 @@ alter table migtest_e_basic drop constraint uq_migtest_e_basic_name;
|
||||
alter table migtest_e_basic drop constraint uq_migtest_e_basic_indextest4;
|
||||
alter table migtest_e_basic drop constraint uq_migtest_e_basic_indextest5;
|
||||
alter table migtest_e_enum drop constraint if exists ck_migtest_e_enum_test_status;
|
||||
alter table migtest_mtm_c_migtest_mtm_m drop constraint if exists fk_migtest_mtm_c_migtest_mtm_m_migtest_mtm_c;
|
||||
alter table migtest_mtm_c_migtest_mtm_m drop constraint if exists fk_migtest_mtm_c_migtest_mtm_m_migtest_mtm_m;
|
||||
alter table migtest_mtm_m_migtest_mtm_c drop constraint if exists fk_migtest_mtm_m_migtest_mtm_c_migtest_mtm_m;
|
||||
alter table migtest_mtm_m_migtest_mtm_c drop constraint if exists fk_migtest_mtm_m_migtest_mtm_c_migtest_mtm_c;
|
||||
alter table migtest_mtm_m_phone_numbers drop constraint if exists fk_migtest_mtm_m_phone_numbers_migtest_mtm_m_id;
|
||||
drop index if exists ix_migtest_e_basic_indextest3;
|
||||
drop index if exists ix_migtest_e_basic_indextest6;
|
||||
drop index if exists ix_table_textfield2;
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
-1547037623, 1.0__initial.sql
|
||||
253988246, 1.1.sql
|
||||
688811494, 1.2__dropsFor_1.1.sql
|
||||
509168727, 1.3.sql
|
||||
-528359263, 1.0__initial.sql
|
||||
-1374084944, 1.1.sql
|
||||
-875723380, 1.2__dropsFor_1.1.sql
|
||||
-819139044, 1.3.sql
|
||||
255653518, 1.4__dropsFor_1.3.sql
|
||||
|
||||
|
||||
@@ -54,6 +54,28 @@ create table migtest_fk_set_null (
|
||||
constraint pk_migtest_fk_set_null primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main (
|
||||
id integer generated by default as identity not null,
|
||||
constraint pk_drop_main primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main_drop_ref_many (
|
||||
drop_main_id integer not null,
|
||||
drop_ref_many_id integer not null,
|
||||
constraint pk_drop_main_drop_ref_many primary key (drop_main_id,drop_ref_many_id)
|
||||
);
|
||||
|
||||
create table drop_ref_many (
|
||||
id integer generated by default as identity not null,
|
||||
constraint pk_drop_ref_many primary key (id)
|
||||
);
|
||||
|
||||
create table drop_ref_one (
|
||||
id integer generated by default as identity not null,
|
||||
parent_id integer,
|
||||
constraint pk_drop_ref_one primary key (id)
|
||||
);
|
||||
|
||||
create table migtest_e_basic (
|
||||
id integer generated by default as identity not null,
|
||||
status varchar(1),
|
||||
@@ -232,6 +254,15 @@ alter table migtest_fk_cascade add constraint fk_migtest_fk_cascade_one_id forei
|
||||
create index ix_migtest_fk_set_null_one_id on migtest_fk_set_null (one_id);
|
||||
alter table migtest_fk_set_null add constraint fk_migtest_fk_set_null_one_id foreign key (one_id) references migtest_fk_one (id) on delete set null on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_main on drop_main_drop_ref_many (drop_main_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_main foreign key (drop_main_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_ref_many on drop_main_drop_ref_many (drop_ref_many_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_ref_many foreign key (drop_ref_many_id) references drop_ref_many (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_ref_one_parent_id on drop_ref_one (parent_id);
|
||||
alter table drop_ref_one add constraint fk_drop_ref_one_parent_id foreign key (parent_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_migtest_e_basic_eref_id on migtest_e_basic (eref_id);
|
||||
alter table migtest_e_basic add constraint fk_migtest_e_basic_eref_id foreign key (eref_id) references migtest_e_ref (id) on delete restrict on update restrict;
|
||||
|
||||
|
||||
@@ -65,6 +65,27 @@ end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_DROP_MAIN_DROP_REF_MANY_DROP_MAIN' and ucase(tabname) = 'DROP_MAIN_DROP_REF_MANY') then
|
||||
prepare stmt from 'alter table drop_main_drop_ref_many drop constraint fk_drop_main_drop_ref_many_drop_main';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_DROP_MAIN_DROP_REF_MANY_DROP_REF_MANY' and ucase(tabname) = 'DROP_MAIN_DROP_REF_MANY') then
|
||||
prepare stmt from 'alter table drop_main_drop_ref_many drop constraint fk_drop_main_drop_ref_many_drop_ref_many';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_DROP_REF_ONE_PARENT_ID' and ucase(tabname) = 'DROP_REF_ONE') then
|
||||
prepare stmt from 'alter table drop_ref_one drop constraint fk_drop_ref_one_parent_id';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select indname from syscat.indexes where indschema = current_schema and ucase(indname) = 'IX_MIGTEST_E_BASIC_INDEXTEST1') then
|
||||
prepare stmt from 'drop index ix_migtest_e_basic_indextest1';
|
||||
execute stmt;
|
||||
|
||||
@@ -15,6 +15,31 @@ alter table migtest_e_history2_history drop column obsolete_string2;
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history2_history');
|
||||
-- apply post alter
|
||||
alter table migtest_e_history2 add versioning use history table migtest_e_history2_history;
|
||||
drop table drop_main;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select seqschema from syscat.sequences where seqschema = current_schema and ucase(seqname) = 'DROP_MAIN_SEQ') then
|
||||
prepare stmt from 'drop sequence drop_main_seq';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
drop table drop_main_drop_ref_many;
|
||||
drop table drop_ref_many;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select seqschema from syscat.sequences where seqschema = current_schema and ucase(seqname) = 'DROP_REF_MANY_SEQ') then
|
||||
prepare stmt from 'drop sequence drop_ref_many_seq';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
drop table drop_ref_one;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select seqschema from syscat.sequences where seqschema = current_schema and ucase(seqname) = 'DROP_REF_ONE_SEQ') then
|
||||
prepare stmt from 'drop sequence drop_ref_one_seq';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
drop table "migtest_QuOtEd";
|
||||
drop table migtest_e_ref;
|
||||
delimiter $$
|
||||
|
||||
@@ -135,6 +135,41 @@ end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_C_MIGTEST_MTM_M_MIGTEST_MTM_C' and ucase(tabname) = 'MIGTEST_MTM_C_MIGTEST_MTM_M') then
|
||||
prepare stmt from 'alter table migtest_mtm_c_migtest_mtm_m drop constraint fk_migtest_mtm_c_migtest_mtm_m_migtest_mtm_c';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_C_MIGTEST_MTM_M_MIGTEST_MTM_M' and ucase(tabname) = 'MIGTEST_MTM_C_MIGTEST_MTM_M') then
|
||||
prepare stmt from 'alter table migtest_mtm_c_migtest_mtm_m drop constraint fk_migtest_mtm_c_migtest_mtm_m_migtest_mtm_m';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_M_MIGTEST_MTM_C_MIGTEST_MTM_M' and ucase(tabname) = 'MIGTEST_MTM_M_MIGTEST_MTM_C') then
|
||||
prepare stmt from 'alter table migtest_mtm_m_migtest_mtm_c drop constraint fk_migtest_mtm_m_migtest_mtm_c_migtest_mtm_m';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_M_MIGTEST_MTM_C_MIGTEST_MTM_C' and ucase(tabname) = 'MIGTEST_MTM_M_MIGTEST_MTM_C') then
|
||||
prepare stmt from 'alter table migtest_mtm_m_migtest_mtm_c drop constraint fk_migtest_mtm_m_migtest_mtm_c_migtest_mtm_c';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_M_PHONE_NUMBERS_MIGTEST_MTM_M_ID' and ucase(tabname) = 'MIGTEST_MTM_M_PHONE_NUMBERS') then
|
||||
prepare stmt from 'alter table migtest_mtm_m_phone_numbers drop constraint fk_migtest_mtm_m_phone_numbers_migtest_mtm_m_id';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select indname from syscat.indexes where indschema = current_schema and ucase(indname) = 'IX_MIGTEST_E_BASIC_INDEXTEST3') then
|
||||
prepare stmt from 'drop index ix_migtest_e_basic_indextest3';
|
||||
execute stmt;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
1307787475, I__create_tablespaces.sql
|
||||
2058232717, 1.0__initial.sql
|
||||
-1450326352, 1.1.sql
|
||||
-1187336846, 1.2__dropsFor_1.1.sql
|
||||
1976888196, 1.3.sql
|
||||
1681764655, 1.0__initial.sql
|
||||
1259437403, 1.1.sql
|
||||
135256939, 1.2__dropsFor_1.1.sql
|
||||
1091218936, 1.3.sql
|
||||
946163478, 1.4__dropsFor_1.3.sql
|
||||
561281075, R__order_views.sql
|
||||
|
||||
|
||||
@@ -54,6 +54,28 @@ create table migtest_fk_set_null (
|
||||
constraint pk_migtest_fk_set_null primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main (
|
||||
id integer generated by default as identity not null,
|
||||
constraint pk_drop_main primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main_drop_ref_many (
|
||||
drop_main_id integer not null,
|
||||
drop_ref_many_id integer not null,
|
||||
constraint pk_drop_main_drop_ref_many primary key (drop_main_id,drop_ref_many_id)
|
||||
);
|
||||
|
||||
create table drop_ref_many (
|
||||
id integer generated by default as identity not null,
|
||||
constraint pk_drop_ref_many primary key (id)
|
||||
);
|
||||
|
||||
create table drop_ref_one (
|
||||
id integer generated by default as identity not null,
|
||||
parent_id integer,
|
||||
constraint pk_drop_ref_one primary key (id)
|
||||
);
|
||||
|
||||
create table migtest_e_basic (
|
||||
id integer generated by default as identity not null,
|
||||
status varchar(1),
|
||||
@@ -232,6 +254,15 @@ alter table migtest_fk_cascade add constraint fk_migtest_fk_cascade_one_id forei
|
||||
create index ix_migtest_fk_set_null_one_id on migtest_fk_set_null (one_id);
|
||||
alter table migtest_fk_set_null add constraint fk_migtest_fk_set_null_one_id foreign key (one_id) references migtest_fk_one (id) on delete set null on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_main on drop_main_drop_ref_many (drop_main_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_main foreign key (drop_main_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_ref_many on drop_main_drop_ref_many (drop_ref_many_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_ref_many foreign key (drop_ref_many_id) references drop_ref_many (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_ref_one_parent_id on drop_ref_one (parent_id);
|
||||
alter table drop_ref_one add constraint fk_drop_ref_one_parent_id foreign key (parent_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_migtest_e_basic_eref_id on migtest_e_basic (eref_id);
|
||||
alter table migtest_e_basic add constraint fk_migtest_e_basic_eref_id foreign key (eref_id) references migtest_e_ref (id) on delete restrict on update restrict;
|
||||
|
||||
|
||||
@@ -65,6 +65,27 @@ end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_DROP_MAIN_DROP_REF_MANY_DROP_MAIN' and ucase(tabname) = 'DROP_MAIN_DROP_REF_MANY') then
|
||||
prepare stmt from 'alter table drop_main_drop_ref_many drop constraint fk_drop_main_drop_ref_many_drop_main';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_DROP_MAIN_DROP_REF_MANY_DROP_REF_MANY' and ucase(tabname) = 'DROP_MAIN_DROP_REF_MANY') then
|
||||
prepare stmt from 'alter table drop_main_drop_ref_many drop constraint fk_drop_main_drop_ref_many_drop_ref_many';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_DROP_REF_ONE_PARENT_ID' and ucase(tabname) = 'DROP_REF_ONE') then
|
||||
prepare stmt from 'alter table drop_ref_one drop constraint fk_drop_ref_one_parent_id';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select indname from syscat.indexes where indschema = current_schema and ucase(indname) = 'IX_MIGTEST_E_BASIC_INDEXTEST1') then
|
||||
prepare stmt from 'drop index ix_migtest_e_basic_indextest1';
|
||||
execute stmt;
|
||||
|
||||
@@ -15,6 +15,31 @@ alter table migtest_e_history2_history drop column obsolete_string2;
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history2_history');
|
||||
-- apply post alter
|
||||
alter table migtest_e_history2 add versioning use history table migtest_e_history2_history;
|
||||
drop table drop_main;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select seqschema from syscat.sequences where seqschema = current_schema and ucase(seqname) = 'DROP_MAIN_SEQ') then
|
||||
prepare stmt from 'drop sequence drop_main_seq';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
drop table drop_main_drop_ref_many;
|
||||
drop table drop_ref_many;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select seqschema from syscat.sequences where seqschema = current_schema and ucase(seqname) = 'DROP_REF_MANY_SEQ') then
|
||||
prepare stmt from 'drop sequence drop_ref_many_seq';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
drop table drop_ref_one;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select seqschema from syscat.sequences where seqschema = current_schema and ucase(seqname) = 'DROP_REF_ONE_SEQ') then
|
||||
prepare stmt from 'drop sequence drop_ref_one_seq';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
drop table "migtest_QuOtEd";
|
||||
drop table migtest_e_ref;
|
||||
delimiter $$
|
||||
|
||||
@@ -135,6 +135,41 @@ end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_C_MIGTEST_MTM_M_MIGTEST_MTM_C' and ucase(tabname) = 'MIGTEST_MTM_C_MIGTEST_MTM_M') then
|
||||
prepare stmt from 'alter table migtest_mtm_c_migtest_mtm_m drop constraint fk_migtest_mtm_c_migtest_mtm_m_migtest_mtm_c';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_C_MIGTEST_MTM_M_MIGTEST_MTM_M' and ucase(tabname) = 'MIGTEST_MTM_C_MIGTEST_MTM_M') then
|
||||
prepare stmt from 'alter table migtest_mtm_c_migtest_mtm_m drop constraint fk_migtest_mtm_c_migtest_mtm_m_migtest_mtm_m';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_M_MIGTEST_MTM_C_MIGTEST_MTM_M' and ucase(tabname) = 'MIGTEST_MTM_M_MIGTEST_MTM_C') then
|
||||
prepare stmt from 'alter table migtest_mtm_m_migtest_mtm_c drop constraint fk_migtest_mtm_m_migtest_mtm_c_migtest_mtm_m';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_M_MIGTEST_MTM_C_MIGTEST_MTM_C' and ucase(tabname) = 'MIGTEST_MTM_M_MIGTEST_MTM_C') then
|
||||
prepare stmt from 'alter table migtest_mtm_m_migtest_mtm_c drop constraint fk_migtest_mtm_m_migtest_mtm_c_migtest_mtm_c';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select constname from syscat.tabconst where tabschema = current_schema and ucase(constname) = 'FK_MIGTEST_MTM_M_PHONE_NUMBERS_MIGTEST_MTM_M_ID' and ucase(tabname) = 'MIGTEST_MTM_M_PHONE_NUMBERS') then
|
||||
prepare stmt from 'alter table migtest_mtm_m_phone_numbers drop constraint fk_migtest_mtm_m_phone_numbers_migtest_mtm_m_id';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select indname from syscat.indexes where indschema = current_schema and ucase(indname) = 'IX_MIGTEST_E_BASIC_INDEXTEST3') then
|
||||
prepare stmt from 'drop index ix_migtest_e_basic_indextest3';
|
||||
execute stmt;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
2058232717, 1.0__initial.sql
|
||||
-1450326352, 1.1.sql
|
||||
-1187336846, 1.2__dropsFor_1.1.sql
|
||||
1976888196, 1.3.sql
|
||||
1681764655, 1.0__initial.sql
|
||||
1259437403, 1.1.sql
|
||||
135256939, 1.2__dropsFor_1.1.sql
|
||||
1091218936, 1.3.sql
|
||||
946163478, 1.4__dropsFor_1.3.sql
|
||||
561281075, R__order_views.sql
|
||||
|
||||
|
||||
@@ -54,6 +54,28 @@ create table migtest_fk_set_null (
|
||||
constraint pk_migtest_fk_set_null primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main (
|
||||
id integer auto_increment not null,
|
||||
constraint pk_drop_main primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main_drop_ref_many (
|
||||
drop_main_id integer not null,
|
||||
drop_ref_many_id integer not null,
|
||||
constraint pk_drop_main_drop_ref_many primary key (drop_main_id,drop_ref_many_id)
|
||||
);
|
||||
|
||||
create table drop_ref_many (
|
||||
id integer auto_increment not null,
|
||||
constraint pk_drop_ref_many primary key (id)
|
||||
);
|
||||
|
||||
create table drop_ref_one (
|
||||
id integer auto_increment not null,
|
||||
parent_id integer,
|
||||
constraint pk_drop_ref_one primary key (id)
|
||||
);
|
||||
|
||||
create table migtest_e_basic (
|
||||
id integer auto_increment not null,
|
||||
status varchar(1),
|
||||
@@ -194,6 +216,15 @@ alter table migtest_fk_cascade add constraint fk_migtest_fk_cascade_one_id forei
|
||||
create index ix_migtest_fk_set_null_one_id on migtest_fk_set_null (one_id);
|
||||
alter table migtest_fk_set_null add constraint fk_migtest_fk_set_null_one_id foreign key (one_id) references migtest_fk_one (id) on delete set null on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_main on drop_main_drop_ref_many (drop_main_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_main foreign key (drop_main_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_ref_many on drop_main_drop_ref_many (drop_ref_many_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_ref_many foreign key (drop_ref_many_id) references drop_ref_many (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_ref_one_parent_id on drop_ref_one (parent_id);
|
||||
alter table drop_ref_one add constraint fk_drop_ref_one_parent_id foreign key (parent_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_migtest_e_basic_eref_id on migtest_e_basic (eref_id);
|
||||
alter table migtest_e_basic add constraint fk_migtest_e_basic_eref_id foreign key (eref_id) references migtest_e_ref (id) on delete restrict on update restrict;
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@ alter table migtest_e_basic drop constraint if exists ck_migtest_e_basic_status2
|
||||
alter table migtest_e_basic drop constraint uq_migtest_e_basic_indextest2;
|
||||
alter table migtest_e_basic drop constraint uq_migtest_e_basic_indextest6;
|
||||
alter table migtest_e_enum drop constraint if exists ck_migtest_e_enum_test_status;
|
||||
alter table drop_main_drop_ref_many drop constraint if exists fk_drop_main_drop_ref_many_drop_main;
|
||||
alter table drop_main_drop_ref_many drop constraint if exists fk_drop_main_drop_ref_many_drop_ref_many;
|
||||
alter table drop_ref_one drop constraint if exists fk_drop_ref_one_parent_id;
|
||||
drop index if exists ix_migtest_e_basic_indextest1;
|
||||
drop index if exists ix_migtest_e_basic_indextest5;
|
||||
drop index if exists ix_migtest_quoted_status1;
|
||||
|
||||
@@ -7,5 +7,9 @@ alter table migtest_e_basic drop column eref_id;
|
||||
alter table migtest_e_history2 drop column obsolete_string1;
|
||||
alter table migtest_e_history2 drop column obsolete_string2;
|
||||
-- apply post alter
|
||||
drop table if exists drop_main;
|
||||
drop table if exists drop_main_drop_ref_many;
|
||||
drop table if exists drop_ref_many;
|
||||
drop table if exists drop_ref_one;
|
||||
drop table if exists "migtest_QuOtEd";
|
||||
drop table if exists migtest_e_ref;
|
||||
|
||||
@@ -14,6 +14,11 @@ alter table migtest_e_basic drop constraint uq_migtest_e_basic_name;
|
||||
alter table migtest_e_basic drop constraint uq_migtest_e_basic_indextest4;
|
||||
alter table migtest_e_basic drop constraint uq_migtest_e_basic_indextest5;
|
||||
alter table migtest_e_enum drop constraint if exists ck_migtest_e_enum_test_status;
|
||||
alter table migtest_mtm_c_migtest_mtm_m drop constraint if exists fk_migtest_mtm_c_migtest_mtm_m_migtest_mtm_c;
|
||||
alter table migtest_mtm_c_migtest_mtm_m drop constraint if exists fk_migtest_mtm_c_migtest_mtm_m_migtest_mtm_m;
|
||||
alter table migtest_mtm_m_migtest_mtm_c drop constraint if exists fk_migtest_mtm_m_migtest_mtm_c_migtest_mtm_m;
|
||||
alter table migtest_mtm_m_migtest_mtm_c drop constraint if exists fk_migtest_mtm_m_migtest_mtm_c_migtest_mtm_c;
|
||||
alter table migtest_mtm_m_phone_numbers drop constraint if exists fk_migtest_mtm_m_phone_numbers_migtest_mtm_m_id;
|
||||
drop index if exists ix_migtest_e_basic_indextest3;
|
||||
drop index if exists ix_migtest_e_basic_indextest6;
|
||||
drop index if exists ix_table_textfield2;
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
-1547037623, 1.0__initial.sql
|
||||
253988246, 1.1.sql
|
||||
688811494, 1.2__dropsFor_1.1.sql
|
||||
509168727, 1.3.sql
|
||||
-528359263, 1.0__initial.sql
|
||||
-1374084944, 1.1.sql
|
||||
-875723380, 1.2__dropsFor_1.1.sql
|
||||
-819139044, 1.3.sql
|
||||
255653518, 1.4__dropsFor_1.3.sql
|
||||
|
||||
|
||||
@@ -54,6 +54,28 @@ create table migtest_fk_set_null (
|
||||
constraint pk_migtest_fk_set_null primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main (
|
||||
id integer generated by default as identity not null,
|
||||
constraint pk_drop_main primary key (id)
|
||||
);
|
||||
|
||||
create table drop_main_drop_ref_many (
|
||||
drop_main_id integer not null,
|
||||
drop_ref_many_id integer not null,
|
||||
constraint pk_drop_main_drop_ref_many primary key (drop_main_id,drop_ref_many_id)
|
||||
);
|
||||
|
||||
create table drop_ref_many (
|
||||
id integer generated by default as identity not null,
|
||||
constraint pk_drop_ref_many primary key (id)
|
||||
);
|
||||
|
||||
create table drop_ref_one (
|
||||
id integer generated by default as identity not null,
|
||||
parent_id integer,
|
||||
constraint pk_drop_ref_one primary key (id)
|
||||
);
|
||||
|
||||
create table migtest_e_basic (
|
||||
id integer generated by default as identity not null,
|
||||
status varchar(1),
|
||||
@@ -269,6 +291,15 @@ alter table migtest_fk_cascade add constraint fk_migtest_fk_cascade_one_id forei
|
||||
create index ix_migtest_fk_set_null_one_id on migtest_fk_set_null (one_id);
|
||||
alter table migtest_fk_set_null add constraint fk_migtest_fk_set_null_one_id foreign key (one_id) references migtest_fk_one (id) on delete set null on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_main on drop_main_drop_ref_many (drop_main_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_main foreign key (drop_main_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_main_drop_ref_many_drop_ref_many on drop_main_drop_ref_many (drop_ref_many_id);
|
||||
alter table drop_main_drop_ref_many add constraint fk_drop_main_drop_ref_many_drop_ref_many foreign key (drop_ref_many_id) references drop_ref_many (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_drop_ref_one_parent_id on drop_ref_one (parent_id);
|
||||
alter table drop_ref_one add constraint fk_drop_ref_one_parent_id foreign key (parent_id) references drop_main (id) on delete restrict on update restrict;
|
||||
|
||||
create index ix_migtest_e_basic_eref_id on migtest_e_basic (eref_id);
|
||||
alter table migtest_e_basic add constraint fk_migtest_e_basic_eref_id foreign key (eref_id) references migtest_e_ref (id) on delete restrict on update restrict;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user