mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Compare commits
32
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18765b3ac2 | ||
|
|
ea8e195183 | ||
|
|
f54c212b67 | ||
|
|
14d11b1c70 | ||
|
|
39de9d56db | ||
|
|
94dbd9d6ad | ||
|
|
7c23dd06f8 | ||
|
|
e813edae01 | ||
|
|
4218d5bd48 | ||
|
|
aaf7aa8386 | ||
|
|
fbe84a7c62 | ||
|
|
cbd213aad3 | ||
|
|
13622f6b62 | ||
|
|
8fe6de376d | ||
|
|
808ba719f4 | ||
|
|
117844b5ee | ||
|
|
fbb73d465c | ||
|
|
a5c3bbb97e | ||
|
|
674150dc75 | ||
|
|
ad938b2ce2 | ||
|
|
5b1ace8607 | ||
|
|
74321277ff | ||
|
|
c60362f6e1 | ||
|
|
c1320e4184 | ||
|
|
a7ea2cf3ef | ||
|
|
f86a0ac973 | ||
|
|
bcc21b1c04 | ||
|
|
d517dea27f | ||
|
|
7df168f232 | ||
|
|
563340edbd | ||
|
|
28d70cf9c4 | ||
|
|
0dda3e0e93 |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-clickhouse</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-clickhouse</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-cockroach</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-db2</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-db2</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-h2</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-hana</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hana</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-mariadb</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mariadb</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-mysql</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-nuodb</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-nuodb</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-oracle</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-oracle</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-postgres</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-sqlite</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlite</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-sqlserver</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-yugabyte</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,18 +35,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean (all platforms)</name>
|
||||
@@ -16,19 +16,19 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-joda-time</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -41,18 +41,18 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
</project>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>composites</artifactId>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean api</name>
|
||||
|
||||
@@ -2,6 +2,28 @@ package io.ebean;
|
||||
|
||||
/**
|
||||
* Thrown when a duplicate is attempted on a unique constraint.
|
||||
* <p>
|
||||
* In terms of catching this exception with the view of continuing processing
|
||||
* using the same transaction look to use {@link Transaction#rollbackAndContinue()}.
|
||||
*
|
||||
* <pre>{@code
|
||||
*
|
||||
* try (Transaction txn = database.beginTransaction()) {
|
||||
*
|
||||
* try {
|
||||
* ...
|
||||
* database.save(bean);
|
||||
* database.flush();
|
||||
* } catch (DuplicateKeyException e) {
|
||||
* // carry on processing using the transaction
|
||||
* txn.rollbackAndContinue();
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* txn.commit();
|
||||
* }
|
||||
*
|
||||
* }</pre>
|
||||
*/
|
||||
public class DuplicateKeyException extends DataIntegrityException {
|
||||
private static final long serialVersionUID = -4771932723285724817L;
|
||||
|
||||
@@ -144,6 +144,35 @@ public interface Transaction extends AutoCloseable {
|
||||
*/
|
||||
void rollback(Throwable e) throws PersistenceException;
|
||||
|
||||
/**
|
||||
* Performs a rollback on the underlying JDBC connection with the intention of
|
||||
* continuing to use this same transaction and performing a commit or rollback
|
||||
* later to complete the transaction.
|
||||
* <p>
|
||||
* Typically used when catching {@link DuplicateKeyException} where we wish to
|
||||
* rollback work done at that point but carry on processing using the transaction.
|
||||
*
|
||||
* <pre>{@code
|
||||
*
|
||||
* try (Transaction txn = database.beginTransaction()) {
|
||||
*
|
||||
* try {
|
||||
* ...
|
||||
* database.save(bean);
|
||||
* database.flush();
|
||||
* } catch (DuplicateKeyException e) {
|
||||
* // carry on processing using the transaction
|
||||
* txn.rollbackAndContinue();
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* txn.commit();
|
||||
* }
|
||||
*
|
||||
* }</pre>
|
||||
*/
|
||||
void rollbackAndContinue();
|
||||
|
||||
/**
|
||||
* Set when we want nested transactions to use Savepoint's.
|
||||
* <p>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</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.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
|
||||
<name>ebean autotune</name>
|
||||
@@ -26,7 +26,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+16
-16
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean bom</name>
|
||||
@@ -89,94 +89,94 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-joda-time</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-xml</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-autotune</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
+13
-14
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core</artifactId>
|
||||
@@ -15,10 +15,15 @@
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
@@ -38,22 +43,16 @@
|
||||
<version>${ebean-migration-auto.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -106,7 +105,7 @@
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>2.9.7</version>
|
||||
<version>2.11.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
@@ -144,21 +143,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -45,15 +45,14 @@ public final class ScopeTrans {
|
||||
* Flag set when nested commit has occurred.
|
||||
*/
|
||||
private boolean nestedCommit;
|
||||
private boolean nestedUseSavepoint;
|
||||
|
||||
public ScopeTrans(boolean rollbackOnChecked, boolean created, SpiTransaction transaction, TxScope txScope) {
|
||||
|
||||
this.rollbackOnChecked = rollbackOnChecked;
|
||||
this.created = created;
|
||||
this.transaction = transaction;
|
||||
this.noRollbackFor = txScope.getNoRollbackFor();
|
||||
this.rollbackFor = txScope.getRollbackFor();
|
||||
|
||||
if (transaction != null) {
|
||||
if (!created && txScope.isBatchSet() || txScope.isBatchOnCascadeSet() || txScope.isBatchSizeSet()) {
|
||||
restoreBatch = transaction.isBatchMode();
|
||||
@@ -90,6 +89,14 @@ public final class ScopeTrans {
|
||||
return "ScopeTrans " + transaction;
|
||||
}
|
||||
|
||||
void setNestedUseSavepoint() {
|
||||
nestedUseSavepoint = true;
|
||||
}
|
||||
|
||||
boolean isNestedUseSavepoint() {
|
||||
return nestedUseSavepoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current/active transaction.
|
||||
*/
|
||||
@@ -101,7 +108,6 @@ public final class ScopeTrans {
|
||||
* Complete the transaction from enhanced transactional. Try to commit.
|
||||
*/
|
||||
void complete(Object returnOrThrowable, int opCode) {
|
||||
|
||||
if (opCode == OPCODE_ATHROW) {
|
||||
// exited with a Throwable
|
||||
caughtThrowable((Throwable) returnOrThrowable);
|
||||
@@ -168,7 +174,6 @@ public final class ScopeTrans {
|
||||
* Returns the exception and this should be thrown by the calling code.
|
||||
*/
|
||||
public <T extends Throwable> T caughtThrowable(T e) {
|
||||
|
||||
if (isRollbackThrowable(e)) {
|
||||
rollback(e);
|
||||
}
|
||||
@@ -188,21 +193,17 @@ public final class ScopeTrans {
|
||||
* Return true if this throwable should cause a rollback to occur.
|
||||
*/
|
||||
private boolean isRollbackThrowable(Throwable e) {
|
||||
|
||||
if (e instanceof Error) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (noRollbackFor != null) {
|
||||
for (Class<? extends Throwable> aNoRollbackFor : noRollbackFor) {
|
||||
if (aNoRollbackFor.equals(e.getClass())) {
|
||||
|
||||
// explicit no rollback for this one
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (rollbackFor != null) {
|
||||
for (Class<? extends Throwable> aRollbackFor : rollbackFor) {
|
||||
if (aRollbackFor.equals(e.getClass())) {
|
||||
@@ -211,7 +212,6 @@ public final class ScopeTrans {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// checked exceptions...
|
||||
// EJB defaults this to false which is not intuitive IMO
|
||||
// Ebean makes this configurable (default to true)
|
||||
|
||||
@@ -33,13 +33,26 @@ public final class ScopedTransaction extends SpiTransactionProxy {
|
||||
return "ScopedTransaction " + current;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNestedUseSavepoint() {
|
||||
current.setNestedUseSavepoint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNestedUseSavepoint() {
|
||||
return current.isNestedUseSavepoint();
|
||||
}
|
||||
|
||||
/**
|
||||
* Push the scope transaction.
|
||||
*/
|
||||
public void push(ScopeTrans scopeTrans) {
|
||||
|
||||
if (current != null) {
|
||||
stack.push(current);
|
||||
if (current.isNestedUseSavepoint()) {
|
||||
// child scope 'inherits' nestedUseSavepoint
|
||||
scopeTrans.setNestedUseSavepoint();
|
||||
}
|
||||
}
|
||||
current = scopeTrans;
|
||||
transaction = scopeTrans.getTransaction();
|
||||
@@ -111,6 +124,11 @@ public final class ScopedTransaction extends SpiTransactionProxy {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollbackAndContinue() {
|
||||
transaction.rollbackAndContinue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollback() throws PersistenceException {
|
||||
try {
|
||||
|
||||
+11
-6
@@ -240,7 +240,7 @@ final class ImplicitReadOnlyTransaction implements SpiTransaction, TxnProfileEve
|
||||
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
if (!isActive()) {
|
||||
if (!active) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
try {
|
||||
@@ -252,7 +252,7 @@ final class ImplicitReadOnlyTransaction implements SpiTransaction, TxnProfileEve
|
||||
|
||||
@Override
|
||||
public void setReadOnly(boolean readOnly) {
|
||||
if (!isActive()) {
|
||||
if (!active) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
try {
|
||||
@@ -403,7 +403,7 @@ final class ImplicitReadOnlyTransaction implements SpiTransaction, TxnProfileEve
|
||||
*/
|
||||
@Override
|
||||
public void setPersistenceContext(SpiPersistenceContext context) {
|
||||
if (!isActive()) {
|
||||
if (!active) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
this.persistenceContext = context;
|
||||
@@ -465,7 +465,7 @@ final class ImplicitReadOnlyTransaction implements SpiTransaction, TxnProfileEve
|
||||
*/
|
||||
@Override
|
||||
public Connection getInternalConnection() {
|
||||
if (!isActive()) {
|
||||
if (!active) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
return connection;
|
||||
@@ -508,7 +508,7 @@ final class ImplicitReadOnlyTransaction implements SpiTransaction, TxnProfileEve
|
||||
*/
|
||||
@Override
|
||||
public void commit() {
|
||||
if (!isActive()) {
|
||||
if (!active) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
// expect AutoCommit so just deactivate / put back into pool
|
||||
@@ -532,6 +532,11 @@ final class ImplicitReadOnlyTransaction implements SpiTransaction, TxnProfileEve
|
||||
throw new IllegalStateException(notExpectedMessage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollbackAndContinue() {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* Rollback the transaction.
|
||||
*/
|
||||
@@ -546,7 +551,7 @@ final class ImplicitReadOnlyTransaction implements SpiTransaction, TxnProfileEve
|
||||
*/
|
||||
@Override
|
||||
public void rollback(Throwable cause) throws PersistenceException {
|
||||
if (!isActive()) {
|
||||
if (!active) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
// expect AutoCommit so it really has already committed
|
||||
|
||||
@@ -424,9 +424,6 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
if (!isActive()) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
try {
|
||||
return connection.isReadOnly();
|
||||
} catch (SQLException e) {
|
||||
@@ -436,9 +433,6 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
|
||||
@Override
|
||||
public void setReadOnly(boolean readOnly) {
|
||||
if (!isActive()) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
try {
|
||||
localReadOnly = readOnly;
|
||||
connection.setReadOnly(readOnly);
|
||||
@@ -459,9 +453,6 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
|
||||
@Override
|
||||
public final void setBatchMode(boolean batchMode) {
|
||||
if (!isActive()) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
this.batchMode = batchMode;
|
||||
}
|
||||
|
||||
@@ -472,9 +463,6 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
|
||||
@Override
|
||||
public final void setBatchOnCascade(boolean batchMode) {
|
||||
if (!isActive()) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
this.batchOnCascadeMode = batchMode;
|
||||
}
|
||||
|
||||
@@ -666,9 +654,6 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
*/
|
||||
@Override
|
||||
public final void flush() {
|
||||
if (!isActive()) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
internalBatchFlush();
|
||||
}
|
||||
|
||||
@@ -707,9 +692,6 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
*/
|
||||
@Override
|
||||
public final void setPersistenceContext(SpiPersistenceContext context) {
|
||||
if (!isActive()) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
this.persistenceContext = context;
|
||||
}
|
||||
|
||||
@@ -776,9 +758,6 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
*/
|
||||
@Override
|
||||
public Connection getInternalConnection() {
|
||||
if (!isActive()) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
return connection;
|
||||
}
|
||||
|
||||
@@ -920,7 +899,7 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
if (rollbackOnly) {
|
||||
return;
|
||||
}
|
||||
if (!isActive()) {
|
||||
if (!active) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
try {
|
||||
@@ -945,7 +924,7 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
rollback();
|
||||
return;
|
||||
}
|
||||
if (!isActive()) {
|
||||
if (!active) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
try {
|
||||
@@ -1014,6 +993,22 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
this.nestedUseSavepoint = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollbackAndContinue() {
|
||||
if (!active) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
internalBatchClear();
|
||||
if (changeLogHolder != null) {
|
||||
changeLogHolder.clear();
|
||||
}
|
||||
try {
|
||||
performRollback();
|
||||
} catch (SQLException ex) {
|
||||
throw new PersistenceException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rollback the transaction.
|
||||
*/
|
||||
@@ -1028,7 +1023,7 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
*/
|
||||
@Override
|
||||
public void rollback(Throwable cause) throws PersistenceException {
|
||||
if (!isActive()) {
|
||||
if (!active) {
|
||||
throw new IllegalStateException(illegalStateMessage);
|
||||
}
|
||||
try {
|
||||
@@ -1066,7 +1061,7 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
*/
|
||||
@Override
|
||||
public void end() throws PersistenceException {
|
||||
if (isActive()) {
|
||||
if (active) {
|
||||
rollback();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,10 +78,14 @@ final class NoTransaction implements SpiTransaction {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollback() throws PersistenceException {
|
||||
public void rollbackAndContinue() {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollback() throws PersistenceException {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollback(Throwable e) throws PersistenceException {
|
||||
|
||||
+15
@@ -2,6 +2,7 @@ package io.ebeaninternal.server.transaction;
|
||||
|
||||
import io.ebeaninternal.api.SpiTransaction;
|
||||
import io.ebeaninternal.api.SpiTransactionProxy;
|
||||
import io.ebeaninternal.api.TransactionEvent;
|
||||
import io.ebeaninternal.server.util.Str;
|
||||
|
||||
import javax.persistence.PersistenceException;
|
||||
@@ -25,6 +26,7 @@ final class SavepointTransaction extends SpiTransactionProxy {
|
||||
|
||||
private boolean rollbackOnly;
|
||||
private int state;
|
||||
private TransactionEvent event;
|
||||
|
||||
SavepointTransaction(SpiTransaction transaction, TransactionManager manager) throws SQLException {
|
||||
this.manager = manager;
|
||||
@@ -40,6 +42,14 @@ final class SavepointTransaction extends SpiTransactionProxy {
|
||||
this.logPrefix = transaction.getLogPrefix() + spPrefix;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TransactionEvent getEvent() {
|
||||
if (event == null) {
|
||||
event = new TransactionEvent();
|
||||
}
|
||||
return event;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLogPrefix() {
|
||||
return logPrefix;
|
||||
@@ -69,6 +79,11 @@ final class SavepointTransaction extends SpiTransactionProxy {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollbackAndContinue() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollback() throws PersistenceException {
|
||||
rollbackSavepoint(null);
|
||||
|
||||
@@ -96,4 +96,7 @@ public final class TChangeLogHolder {
|
||||
owner.sendChangeLog(changes);
|
||||
}
|
||||
|
||||
void clear() {
|
||||
changes.getChanges().clear();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -573,7 +573,7 @@ public class TransactionManager implements SpiTransactionManager {
|
||||
} else {
|
||||
setToScope = false;
|
||||
transaction = txnContainer.current();
|
||||
nestedSavepoint = transaction.isNestedUseSavepoint();
|
||||
nestedSavepoint = txnContainer.isNestedUseSavepoint();
|
||||
}
|
||||
|
||||
TxType type = txScope.getType();
|
||||
|
||||
@@ -37,7 +37,7 @@ module io.ebean.core {
|
||||
requires static java.naming;
|
||||
requires static java.validation;
|
||||
requires static org.postgresql.jdbc;
|
||||
requires static joda.time;
|
||||
requires static org.joda.time;
|
||||
|
||||
exports io.ebeaninternal.server.cache;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-csv-reader</artifactId>
|
||||
@@ -14,21 +14,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean ddl generation</name>
|
||||
@@ -28,14 +28,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+6
-5
@@ -39,12 +39,12 @@ public class DB2Ddl extends PlatformDdl {
|
||||
return String.format(MOVE_TABLE, tablename.toUpperCase(), tableSpace, indexSpace, lobSpace);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String alterTableAddUniqueConstraint(String tableName, String uqName, String[] columns, String[] nullableColumns) {
|
||||
if (nullableColumns == null || nullableColumns.length == 0) {
|
||||
return super.alterTableAddUniqueConstraint(tableName, uqName, columns, nullableColumns);
|
||||
}
|
||||
}
|
||||
|
||||
if (uqName == null) {
|
||||
throw new NullPointerException();
|
||||
@@ -66,7 +66,7 @@ public class DB2Ddl extends PlatformDdl {
|
||||
public void addTablespace(DdlBuffer apply, String tablespaceName, String indexTablespace, String lobTablespace) {
|
||||
apply.append(" in ").append(tablespaceName).append(" index in ").append(indexTablespace).append(" long in ").append(lobTablespace);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void alterTableAddColumn(DdlWrite writer, String tableName, Column column, boolean onHistoryTable, String defaultValue) {
|
||||
|
||||
@@ -209,7 +209,7 @@ public class DB2Ddl extends PlatformDdl {
|
||||
|
||||
/**
|
||||
* determine, if we need a reorg.
|
||||
*
|
||||
*
|
||||
* See: https://www.ibm.com/docs/en/db2/11.5?topic=statements-alter-table The following is the full list of REORG-recommended
|
||||
* ALTER statements that cause a version change and place the table into a REORG-pending state:
|
||||
* <ul>
|
||||
@@ -221,7 +221,7 @@ public class DB2Ddl extends PlatformDdl {
|
||||
* Decreasing the length of a VARCHAR or VARGRAPHIC column without truncating trailing blanks from existing data, when no indexes
|
||||
* exist on the column
|
||||
* </ul>
|
||||
*
|
||||
*
|
||||
*/
|
||||
private boolean checkReorg(AlterCmd cmd) {
|
||||
switch (cmd.getOperation()) {
|
||||
@@ -230,6 +230,7 @@ public class DB2Ddl extends PlatformDdl {
|
||||
case "alter column":
|
||||
String alter = cmd.getAlternation();
|
||||
return alter.equals("set not null")
|
||||
|| alter.equals("drop not null")
|
||||
|| alter.equals("drop not default")
|
||||
|| alter.startsWith("set data type"); // note: altering varchar length only is not detected here
|
||||
default:
|
||||
|
||||
+7
-4
@@ -161,7 +161,9 @@ public class ModelContainer {
|
||||
applyChange((AlterForeignKey) change);
|
||||
} else if (change instanceof AddTableComment) {
|
||||
applyChange((AddTableComment) change);
|
||||
} else if (change instanceof Sql || change instanceof CreateSchema) {
|
||||
} else if (change instanceof CreateSchema) {
|
||||
applyChange((CreateSchema)change);
|
||||
} else if (change instanceof Sql) {
|
||||
// do nothing
|
||||
} else {
|
||||
throw new IllegalArgumentException("No rule for " + change);
|
||||
@@ -173,7 +175,6 @@ public class ModelContainer {
|
||||
* Set the withHistory flag on the associated base table.
|
||||
*/
|
||||
private void applyChange(AddHistoryTable change) {
|
||||
|
||||
MTable table = tables.get(change.getBaseTable());
|
||||
if (table == null) {
|
||||
throw new IllegalStateException("Table [" + change.getBaseTable() + "] does not exist in model?");
|
||||
@@ -185,7 +186,6 @@ public class ModelContainer {
|
||||
* Unset the withHistory flag on the associated base table.
|
||||
*/
|
||||
protected void applyChange(DropHistoryTable change) {
|
||||
|
||||
MTable table = tables.get(change.getBaseTable());
|
||||
if (table != null) {
|
||||
table.setWithHistory(false);
|
||||
@@ -228,6 +228,10 @@ public class ModelContainer {
|
||||
}
|
||||
}
|
||||
|
||||
protected void applyChange(CreateSchema createSchema) {
|
||||
schemas.add(createSchema.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply a CreateTable change to the model.
|
||||
*/
|
||||
@@ -426,7 +430,6 @@ public class ModelContainer {
|
||||
* Register a drop column on a history tables that has not been applied yet.
|
||||
*/
|
||||
private void registerPendingDropColumn(DropColumn dropColumn) {
|
||||
|
||||
MTable table = getTable(dropColumn.getTableName());
|
||||
if (table == null) {
|
||||
throw new IllegalArgumentException("Table [" + dropColumn.getTableName() + "] not found?");
|
||||
|
||||
+6
-6
@@ -36,7 +36,7 @@ BEGIN
|
||||
FETCH NEXT FROM index_cursor INTO @indexName
|
||||
WHILE @@FETCH_STATUS = 0
|
||||
BEGIN
|
||||
set @sql = 'drop index ' + @indexName + ' on ' + @tableName;
|
||||
set @sql = 'drop index ' + @indexName + ' on [' + @tableName + ']';
|
||||
EXECUTE(@sql);
|
||||
|
||||
FETCH NEXT FROM index_cursor INTO @indexName
|
||||
@@ -58,7 +58,7 @@ BEGIN
|
||||
join sys.columns t2 on t1.object_id = t2.default_object_id
|
||||
where t1.parent_object_id = OBJECT_ID(@tableName) and t2.name = @columnName;
|
||||
|
||||
if @tmp is not null EXEC('alter table ' + @tableName +' drop constraint ' + @tmp);
|
||||
if @tmp is not null EXEC('alter table [' + @tableName +'] drop constraint ' + @tmp);
|
||||
END
|
||||
GO
|
||||
|
||||
@@ -85,7 +85,7 @@ BEGIN
|
||||
FETCH NEXT FROM name_cursor INTO @constraintName
|
||||
WHILE @@FETCH_STATUS = 0
|
||||
BEGIN
|
||||
set @sql = 'alter table ' + @tableName + ' drop constraint ' + @constraintName;
|
||||
set @sql = 'alter table [' + @tableName + '] drop constraint ' + @constraintName;
|
||||
EXECUTE(@sql);
|
||||
|
||||
FETCH NEXT FROM name_cursor INTO @constraintName
|
||||
@@ -107,7 +107,7 @@ BEGIN
|
||||
EXEC usp_ebean_drop_default_constraint @tableName, @columnName;
|
||||
EXEC usp_ebean_drop_constraints @tableName, @columnName;
|
||||
|
||||
set @sql = 'alter table ' + @tableName + ' drop column ' + @columnName;
|
||||
set @sql = 'alter table [' + @tableName + '] drop column [' + @columnName + ']';
|
||||
EXECUTE(@sql);
|
||||
END
|
||||
GO
|
||||
@@ -136,7 +136,7 @@ FETCH curs INTO c_fk_name;
|
||||
IF done THEN
|
||||
LEAVE read_loop;
|
||||
END IF;
|
||||
SET @sql = CONCAT('ALTER TABLE ', p_table_name, ' DROP FOREIGN KEY ', c_fk_name);
|
||||
SET @sql = CONCAT('ALTER TABLE `', p_table_name, '` DROP FOREIGN KEY ', c_fk_name);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
END LOOP;
|
||||
@@ -155,7 +155,7 @@ delimiter $$
|
||||
CREATE PROCEDURE usp_ebean_drop_column(IN p_table_name VARCHAR(255), IN p_column_name VARCHAR(255))
|
||||
BEGIN
|
||||
CALL usp_ebean_drop_foreign_keys(p_table_name, p_column_name);
|
||||
SET @sql = CONCAT('ALTER TABLE ', p_table_name, ' DROP COLUMN ', p_column_name);
|
||||
SET @sql = CONCAT('ALTER TABLE `', p_table_name, '` DROP COLUMN `', p_column_name, '`');
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
END
|
||||
|
||||
+4
-2
@@ -175,7 +175,8 @@ public class PlatformDdl_AlterColumnTest {
|
||||
sql = alterColumn(db2Ddl, alter);
|
||||
softly.assertThat(sql).isEqualTo("-- apply alter tables\n"
|
||||
+ "alter table mytab alter column acol drop default;\n"
|
||||
+ "alter table mytab alter column acol drop not null;\n");
|
||||
+ "alter table mytab alter column acol drop not null;\n"
|
||||
+ "call sysproc.admin_cmd('reorg table mytab');\n");
|
||||
|
||||
}
|
||||
|
||||
@@ -319,7 +320,8 @@ public class PlatformDdl_AlterColumnTest {
|
||||
|
||||
sql = alterColumn(db2Ddl, alter);
|
||||
softly.assertThat(sql).isEqualTo("-- apply alter tables\n"
|
||||
+ "alter table mytab alter column acol drop not null;\n");
|
||||
+ "alter table mytab alter column acol drop not null;\n"
|
||||
+ "call sysproc.admin_cmd('reorg table mytab');\n");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+2
@@ -45,6 +45,8 @@ class ModelContainerApplyTest {
|
||||
|
||||
ModelContainer model = new ModelContainer();
|
||||
model.apply(migration, MigrationVersion.parse("1.1"));
|
||||
|
||||
assertThat(model.getSchemas()).contains("foo");
|
||||
}
|
||||
|
||||
private Migration newMigration(Object change) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean external mapping api</name>
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>ebean-parent-13.9.0</tag>
|
||||
<tag>ebean-parent-13.9.3</tag>
|
||||
</scm>
|
||||
|
||||
<name>ebean external mapping xml</name>
|
||||
@@ -21,7 +21,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -54,21 +54,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>2.11.0</version>
|
||||
<version>2.11.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0-SNAPSHOT</version>
|
||||
<version>13.9.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-kotlin</artifactId>
|
||||
@@ -28,7 +28,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0-SNAPSHOT</version>
|
||||
<version>13.9.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.9.0-SNAPSHOT</version>
|
||||
<version>13.9.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean postgis</name>
|
||||
@@ -22,14 +22,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- provided scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean querybean</name>
|
||||
@@ -17,7 +17,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>1.6</version>
|
||||
<version>2.11.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
@@ -63,21 +63,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ module io.ebean.querybean {
|
||||
requires io.ebean.api;
|
||||
requires io.ebean.core;
|
||||
requires static io.ebean.types;
|
||||
requires static joda.time;
|
||||
requires static org.joda.time;
|
||||
requires static io.avaje.jsr305x;
|
||||
|
||||
}
|
||||
|
||||
+6
-6
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
@@ -22,35 +22,35 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+8
-8
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean test</name>
|
||||
@@ -28,20 +28,20 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -67,7 +67,7 @@
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>3.22.0</version>
|
||||
<version>3.23.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Including JAXB for DB Migration generation with Java 11+ -->
|
||||
@@ -105,14 +105,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-joda-time</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.9.0</version>
|
||||
<version>13.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>2.11.0</version>
|
||||
<version>2.11.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ module io.ebean.test {
|
||||
requires transitive com.h2database;
|
||||
|
||||
// support testing
|
||||
requires static org.slf4j;
|
||||
requires static org.junit.jupiter.api;
|
||||
requires static jdk.management;
|
||||
requires static io.avaje.jsr305x;
|
||||
|
||||
@@ -54,37 +54,37 @@ public class ExtendedServerTest extends BaseTestCase {
|
||||
@Test
|
||||
public void mockClock() {
|
||||
|
||||
Database server = DB.getDefault();
|
||||
Database database = DB.getDefault();
|
||||
final Instant snapshot = Instant.now();
|
||||
Instant backedSnapshot = snapshot.minus(1, ChronoUnit.DAYS);
|
||||
Clock snapshotClock = Clock.fixed(backedSnapshot, Clock.systemUTC().getZone());
|
||||
|
||||
server.extended().setClock(snapshotClock);
|
||||
database.extended().setClock(snapshotClock);
|
||||
|
||||
ResetBasicData.reset();
|
||||
|
||||
int count = server
|
||||
int count = database
|
||||
.find(Customer.class)
|
||||
.where()
|
||||
.gt("cretime", snapshot)
|
||||
.findCount();
|
||||
assertThat(count).isEqualTo(0);
|
||||
|
||||
int count2 = server
|
||||
int count2 = database
|
||||
.find(Customer.class)
|
||||
.where()
|
||||
.ge("cretime", backedSnapshot)
|
||||
.findCount();
|
||||
assertThat(count2).isGreaterThan(0);
|
||||
|
||||
int count3 = server
|
||||
int count3 = database
|
||||
.find(Customer.class)
|
||||
.where()
|
||||
.gt("updtime", snapshot)
|
||||
.findCount();
|
||||
assertThat(count3).isEqualTo(0);
|
||||
|
||||
int count4 = server
|
||||
int count4 = database
|
||||
.find(Customer.class)
|
||||
.where()
|
||||
.ge("updtime", backedSnapshot)
|
||||
|
||||
@@ -293,6 +293,7 @@ public class DbMigrationTest extends BaseTestCase {
|
||||
table.setFrom("foo");
|
||||
table.setTo("bar");
|
||||
table.setIndex("id");
|
||||
table.setTextfield("test");
|
||||
tmpServer.save(table);
|
||||
table = tmpServer.find(ETable.class).where().eq("index", "id").findOne();
|
||||
assert table != null;
|
||||
|
||||
@@ -3,6 +3,7 @@ package misc.migration.v1_0;
|
||||
import io.ebean.annotation.DbComment;
|
||||
import io.ebean.annotation.History;
|
||||
import io.ebean.annotation.Index;
|
||||
import io.ebean.annotation.NotNull;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.List;
|
||||
@@ -36,6 +37,17 @@ public class ETable {
|
||||
@OneToMany(mappedBy = "foreign")
|
||||
List<ETable> foreigns;
|
||||
|
||||
@NotNull
|
||||
private String textfield;
|
||||
|
||||
public void setTextfield(String textfield) {
|
||||
this.textfield = textfield;
|
||||
}
|
||||
|
||||
public String getTextfield() {
|
||||
return textfield;
|
||||
}
|
||||
|
||||
public String getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
@@ -39,4 +39,9 @@ public class ETable {
|
||||
|
||||
@OneToMany(mappedBy = "foreign")
|
||||
List<ETable> foreigns;
|
||||
|
||||
private String textfield;
|
||||
|
||||
@Index
|
||||
private String textfield2;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
package org.tests.insert;
|
||||
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.DuplicateKeyException;
|
||||
import io.ebean.annotation.Transactional;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.tests.model.draftable.Document;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
@@ -92,14 +91,8 @@ public class TestInsertDuplicateKey extends BaseTestCase {
|
||||
DB.getDefault().currentTransaction().flush();
|
||||
} catch (DuplicateKeyException e) {
|
||||
log.info("duplicate failed but just continue" + e.getMessage());
|
||||
try {
|
||||
// typically we would use transaction.commitAndContinue()
|
||||
// ... this is a rollback and continue type scenario
|
||||
// ... more sensible to use a second transaction that do this
|
||||
DB.getDefault().currentTransaction().connection().rollback();
|
||||
} catch (SQLException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
// rollback and continue using the transaction
|
||||
DB.getDefault().currentTransaction().rollbackAndContinue();
|
||||
}
|
||||
|
||||
Document doc0 = new Document();
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
package org.tests.transaction;
|
||||
|
||||
import io.ebean.*;
|
||||
import io.ebean.test.LoggedSql;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import io.ebean.xtest.IgnorePlatform;
|
||||
import io.ebean.annotation.Platform;
|
||||
import io.ebeaninternal.api.SpiTransaction;
|
||||
import io.ebeaninternal.api.TransactionEvent;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.EBasic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
@@ -60,6 +65,34 @@ public class TestNestedSubTransaction extends BaseTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
@IgnorePlatform({Platform.SQLSERVER, Platform.MYSQL, Platform.HANA, Platform.ORACLE})
|
||||
@Test
|
||||
void nestedNested() {
|
||||
LoggedSql.start();
|
||||
try (Transaction txn0 = DB.beginTransaction()) {
|
||||
runNestedMethod();
|
||||
try (Transaction txnAfter = DB.beginTransaction()) {
|
||||
DB.save(new EBasic("startAfter"));
|
||||
}
|
||||
}
|
||||
List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(3);
|
||||
assertThat(sql.get(0)).contains("insert into e_basic").contains("sp[");
|
||||
assertThat(sql.get(1)).contains("insert into e_basic").doesNotContain("sp[");
|
||||
assertThat(sql.get(2)).contains("insert into e_basic").doesNotContain("sp[");
|
||||
}
|
||||
|
||||
void runNestedMethod() {
|
||||
try (Transaction txn0 = DB.beginTransaction()) {
|
||||
txn0.setNestedUseSavepoint();
|
||||
try (Transaction nested = DB.beginTransaction()) {
|
||||
DB.save(new EBasic("nested in sp"));
|
||||
nested.commit();
|
||||
}
|
||||
DB.save(new EBasic("nested"));
|
||||
txn0.commit();
|
||||
}
|
||||
}
|
||||
|
||||
@IgnorePlatform({Platform.SQLSERVER, Platform.MYSQL, Platform.HANA, Platform.ORACLE})
|
||||
@Test
|
||||
@@ -75,10 +108,15 @@ public class TestNestedSubTransaction extends BaseTestCase {
|
||||
|
||||
server.save(bean);
|
||||
|
||||
TransactionEvent event0 = ((SpiTransaction) txn0).getEvent();
|
||||
|
||||
try (Transaction txn1 = server.beginTransaction()) {
|
||||
bean.setName("updateNested");
|
||||
server.save(bean);
|
||||
|
||||
TransactionEvent event1 = ((SpiTransaction) txn1).getEvent();
|
||||
assertThat(event1).isNotSameAs(event0);
|
||||
|
||||
try (Transaction txn2 = server.beginTransaction()) {
|
||||
bean.setName("barney");
|
||||
DB.save(bean);
|
||||
|
||||
@@ -126,7 +126,8 @@ create table "table" (
|
||||
"from" String,
|
||||
"to" String,
|
||||
"varchar" String,
|
||||
"foreign" String
|
||||
"foreign" String,
|
||||
textfield String
|
||||
) ENGINE = Log();
|
||||
|
||||
create table migtest_mtm_c (
|
||||
|
||||
@@ -38,7 +38,9 @@ update migtest_e_history2 set test_string = 'unknown' where test_string is null;
|
||||
-- NOTE: table has @History - special migration may be necessary
|
||||
update migtest_e_history6 set test_number1 = 42 where test_number1 is null;
|
||||
-- apply alter tables
|
||||
alter table "table" alter column textfield set null;
|
||||
alter table "table" add column "select" String;
|
||||
alter table "table" add column textfield2 String;
|
||||
alter table migtest_ckey_detail add column one_key UInt32;
|
||||
alter table migtest_ckey_detail add column two_key String;
|
||||
alter table migtest_ckey_parent add column assoc_id UInt32;
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
-- Migrationscripts for ebean unittest
|
||||
-- apply alter tables
|
||||
alter table "table" drop column textfield;
|
||||
alter table "table" drop column textfield2;
|
||||
alter table migtest_ckey_detail drop column one_key;
|
||||
alter table migtest_ckey_detail drop column two_key;
|
||||
alter table migtest_ckey_parent drop column assoc_id;
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
235371332, 1.0__initial.sql
|
||||
74490120, 1.1.sql
|
||||
193400547, 1.0__initial.sql
|
||||
540706946, 1.1.sql
|
||||
688811494, 1.2__dropsFor_1.1.sql
|
||||
1015552567, 1.3.sql
|
||||
80209848, 1.4__dropsFor_1.3.sql
|
||||
255653518, 1.4__dropsFor_1.3.sql
|
||||
|
||||
|
||||
@@ -156,6 +156,7 @@ create table "table" (
|
||||
"to" varchar(255),
|
||||
"varchar" varchar(255),
|
||||
"foreign" varchar(255),
|
||||
textfield varchar(255) not null,
|
||||
constraint uq_table_to unique ("to"),
|
||||
constraint uq_table_varchar unique ("varchar"),
|
||||
constraint pk_table primary key ("index")
|
||||
|
||||
@@ -46,7 +46,9 @@ update migtest_e_history2 set test_string = 'unknown' where test_string is null;
|
||||
-- NOTE: table has @History - special migration may be necessary
|
||||
update migtest_e_history6 set test_number1 = 42 where test_number1 is null;
|
||||
-- apply alter tables
|
||||
alter table "table" alter column textfield drop not null;
|
||||
alter table "table" add column "select" varchar(255);
|
||||
alter table "table" add column textfield2 varchar(255);
|
||||
alter table migtest_ckey_detail add column one_key integer;
|
||||
alter table migtest_ckey_detail add column two_key varchar(127);
|
||||
alter table migtest_ckey_parent add column assoc_id integer;
|
||||
@@ -116,3 +118,4 @@ alter table migtest_oto_child add constraint fk_migtest_oto_child_master_id fore
|
||||
|
||||
create index ix_migtest_e_basic_indextest3 on migtest_e_basic (indextest3);
|
||||
create index ix_migtest_e_basic_indextest6 on migtest_e_basic (indextest6);
|
||||
create index ix_table_textfield2 on "table" (textfield2);
|
||||
|
||||
@@ -16,6 +16,7 @@ drop index uq_migtest_e_basic_indextest5 cascade;
|
||||
alter table migtest_e_enum drop constraint if exists ck_migtest_e_enum_test_status;
|
||||
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;
|
||||
-- apply changes
|
||||
create table "migtest_QuOtEd" (
|
||||
id varchar(255) not null,
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
-- Migrationscripts for ebean unittest
|
||||
-- apply alter tables
|
||||
alter table "table" drop column textfield;
|
||||
alter table "table" drop column textfield2;
|
||||
alter table migtest_ckey_detail drop column one_key;
|
||||
alter table migtest_ckey_detail drop column two_key;
|
||||
alter table migtest_ckey_parent drop column assoc_id;
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
-703764770, 1.0__initial.sql
|
||||
773862451, 1.1.sql
|
||||
1434934404, 1.0__initial.sql
|
||||
1284257915, 1.1.sql
|
||||
856096334, 1.2__dropsFor_1.1.sql
|
||||
17665322, 1.3.sql
|
||||
-820814009, 1.4__dropsFor_1.3.sql
|
||||
-1551362011, 1.3.sql
|
||||
-971909974, 1.4__dropsFor_1.3.sql
|
||||
561281075, R__order_views.sql
|
||||
|
||||
|
||||
@@ -152,6 +152,7 @@ create table "table" (
|
||||
"to" varchar(255),
|
||||
"varchar" varchar(255),
|
||||
"foreign" varchar(255),
|
||||
textfield varchar(255) not null,
|
||||
constraint pk_table primary key ("index")
|
||||
);
|
||||
comment on column "table"."index" is 'this is a comment';
|
||||
|
||||
@@ -130,7 +130,10 @@ alter table "table" drop versioning;
|
||||
CALL SYSPROC.ADMIN_MOVE_TABLE(CURRENT_SCHEMA,'MIGTEST_MTM_C','TESTTS','TESTTS','TESTTS','','','','','','MOVE');
|
||||
CALL SYSPROC.ADMIN_MOVE_TABLE(CURRENT_SCHEMA,'MIGTEST_MTM_M','TSMASTER','TSMASTER','TSMASTER','','','','','','MOVE');
|
||||
-- apply alter tables
|
||||
alter table "table" alter column textfield drop not null;
|
||||
alter table "table" add column "select" varchar(255);
|
||||
alter table "table" add column textfield2 varchar(255);
|
||||
call sysproc.admin_cmd('reorg table "table"');
|
||||
alter table migtest_ckey_detail add column one_key integer;
|
||||
alter table migtest_ckey_detail add column two_key varchar(127);
|
||||
alter table migtest_ckey_parent add column assoc_id integer;
|
||||
@@ -180,7 +183,10 @@ alter table migtest_e_history6_history alter column test_number2 drop not null;
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history6_history');
|
||||
alter table migtest_e_softdelete add column deleted smallint default 0 default false not null;
|
||||
alter table migtest_oto_child add column master_id bigint;
|
||||
alter table table_history alter column textfield drop not null;
|
||||
alter table table_history add column "select" varchar(255);
|
||||
alter table table_history add column textfield2 varchar(255);
|
||||
call sysproc.admin_cmd('reorg table table_history');
|
||||
-- apply post alter
|
||||
alter table migtest_e_basic add constraint ck_migtest_e_basic_status check ( status in ('N','A','I','?'));
|
||||
create unique index uq_migtest_e_basic_description on migtest_e_basic(description) exclude null keys;
|
||||
@@ -232,3 +238,4 @@ alter table migtest_oto_child add constraint fk_migtest_oto_child_master_id fore
|
||||
|
||||
create index ix_migtest_e_basic_indextest3 on migtest_e_basic (indextest3);
|
||||
create index ix_migtest_e_basic_indextest6 on migtest_e_basic (indextest6);
|
||||
create index ix_table_textfield2 on "table" (textfield2);
|
||||
|
||||
@@ -147,6 +147,13 @@ if exists (select indname from syscat.indexes where indschema = current_schema a
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select indname from syscat.indexes where indschema = current_schema and ucase(indname) = 'IX_TABLE_TEXTFIELD2') then
|
||||
prepare stmt from 'drop index ix_table_textfield2';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
-- apply changes
|
||||
create table "migtest_QuOtEd" (
|
||||
id varchar(255) not null,
|
||||
@@ -200,9 +207,11 @@ alter table migtest_e_history2 alter column test_string drop default;
|
||||
alter table migtest_e_history2 alter column test_string drop not null;
|
||||
alter table migtest_e_history2 add column obsolete_string1 varchar(255);
|
||||
alter table migtest_e_history2 add column obsolete_string2 varchar(255);
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history2');
|
||||
alter table migtest_e_history2_history alter column test_string drop not null;
|
||||
alter table migtest_e_history2_history add column obsolete_string1 varchar(255);
|
||||
alter table migtest_e_history2_history add column obsolete_string2 varchar(255);
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history2_history');
|
||||
alter table migtest_e_history4 alter column test_number set data type integer;
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history4');
|
||||
alter table migtest_e_history4_history alter column test_number set data type integer;
|
||||
|
||||
@@ -4,7 +4,11 @@ alter table migtest_e_history drop versioning;
|
||||
alter table migtest_e_history drop period system_time;
|
||||
alter table migtest_e_history2 drop versioning;
|
||||
alter table migtest_e_history5 drop versioning;
|
||||
alter table "table" drop versioning;
|
||||
-- apply alter tables
|
||||
alter table "table" drop column textfield;
|
||||
alter table "table" drop column textfield2;
|
||||
call sysproc.admin_cmd('reorg table "table"');
|
||||
alter table migtest_ckey_detail drop column one_key;
|
||||
alter table migtest_ckey_detail drop column two_key;
|
||||
call sysproc.admin_cmd('reorg table migtest_ckey_detail');
|
||||
@@ -36,10 +40,14 @@ alter table migtest_e_softdelete drop column deleted;
|
||||
call sysproc.admin_cmd('reorg table migtest_e_softdelete');
|
||||
alter table migtest_oto_child drop column master_id;
|
||||
call sysproc.admin_cmd('reorg table migtest_oto_child');
|
||||
alter table table_history drop column textfield;
|
||||
alter table table_history drop column textfield2;
|
||||
call sysproc.admin_cmd('reorg table table_history');
|
||||
-- apply post alter
|
||||
drop table migtest_e_history_history;
|
||||
alter table migtest_e_history2 add versioning use history table migtest_e_history2_history;
|
||||
alter table migtest_e_history5 add versioning use history table migtest_e_history5_history;
|
||||
alter table "table" add versioning use history table table_history;
|
||||
drop table migtest_e_user;
|
||||
delimiter $$
|
||||
begin
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
1873955813, 1.0__initial.sql
|
||||
-1557626294, 1.1.sql
|
||||
-1467839063, 1.0__initial.sql
|
||||
-184000413, 1.1.sql
|
||||
-1187336846, 1.2__dropsFor_1.1.sql
|
||||
2066110925, 1.3.sql
|
||||
-1713819679, 1.4__dropsFor_1.3.sql
|
||||
-150875853, 1.3.sql
|
||||
946163478, 1.4__dropsFor_1.3.sql
|
||||
561281075, R__order_views.sql
|
||||
|
||||
|
||||
@@ -156,6 +156,7 @@ create table "table" (
|
||||
"to" varchar(255),
|
||||
"varchar" varchar(255),
|
||||
"foreign" varchar(255),
|
||||
textfield varchar(255) not null,
|
||||
constraint uq_table_to unique ("to"),
|
||||
constraint uq_table_varchar unique ("varchar"),
|
||||
constraint pk_table primary key ("index")
|
||||
|
||||
@@ -46,7 +46,9 @@ update migtest_e_history2 set test_string = 'unknown' where test_string is null;
|
||||
-- NOTE: table has @History - special migration may be necessary
|
||||
update migtest_e_history6 set test_number1 = 42 where test_number1 is null;
|
||||
-- apply alter tables
|
||||
alter table "table" alter column textfield set null;
|
||||
alter table "table" add column "select" varchar(255);
|
||||
alter table "table" add column textfield2 varchar(255);
|
||||
alter table migtest_ckey_detail add column one_key integer;
|
||||
alter table migtest_ckey_detail add column two_key varchar(127);
|
||||
alter table migtest_ckey_parent add column assoc_id integer;
|
||||
@@ -119,3 +121,4 @@ alter table migtest_oto_child add constraint fk_migtest_oto_child_master_id fore
|
||||
|
||||
create index ix_migtest_e_basic_indextest3 on migtest_e_basic (indextest3);
|
||||
create index ix_migtest_e_basic_indextest6 on migtest_e_basic (indextest6);
|
||||
create index ix_table_textfield2 on "table" (textfield2);
|
||||
|
||||
@@ -16,6 +16,7 @@ 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;
|
||||
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;
|
||||
-- apply changes
|
||||
create table "migtest_QuOtEd" (
|
||||
id varchar(255) not null,
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
-- Migrationscripts for ebean unittest
|
||||
-- apply alter tables
|
||||
alter table "table" drop column textfield;
|
||||
alter table "table" drop column textfield2;
|
||||
alter table migtest_ckey_detail drop column one_key;
|
||||
alter table migtest_ckey_detail drop column two_key;
|
||||
alter table migtest_ckey_parent drop column assoc_id;
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
-710189690, 1.0__initial.sql
|
||||
-145836847, 1.1.sql
|
||||
-1547037623, 1.0__initial.sql
|
||||
253988246, 1.1.sql
|
||||
688811494, 1.2__dropsFor_1.1.sql
|
||||
2025934113, 1.3.sql
|
||||
80209848, 1.4__dropsFor_1.3.sql
|
||||
509168727, 1.3.sql
|
||||
255653518, 1.4__dropsFor_1.3.sql
|
||||
|
||||
|
||||
@@ -152,6 +152,7 @@ create table "table" (
|
||||
"to" varchar(255),
|
||||
"varchar" varchar(255),
|
||||
"foreign" varchar(255),
|
||||
textfield varchar(255) not null,
|
||||
constraint pk_table primary key ("index")
|
||||
);
|
||||
comment on column "table"."index" is 'this is a comment';
|
||||
|
||||
@@ -130,7 +130,10 @@ alter table "table" drop versioning;
|
||||
CALL SYSPROC.ADMIN_MOVE_TABLE(CURRENT_SCHEMA,'MIGTEST_MTM_C','TESTTS','TESTTS','TESTTS','','','','','','MOVE');
|
||||
CALL SYSPROC.ADMIN_MOVE_TABLE(CURRENT_SCHEMA,'MIGTEST_MTM_M','TSMASTER','TSMASTER','TSMASTER','','','','','','MOVE');
|
||||
-- apply alter tables
|
||||
alter table "table" alter column textfield drop not null;
|
||||
alter table "table" add column "select" varchar(255);
|
||||
alter table "table" add column textfield2 varchar(255);
|
||||
call sysproc.admin_cmd('reorg table "table"');
|
||||
alter table migtest_ckey_detail add column one_key integer;
|
||||
alter table migtest_ckey_detail add column two_key varchar(127);
|
||||
alter table migtest_ckey_parent add column assoc_id integer;
|
||||
@@ -180,7 +183,10 @@ alter table migtest_e_history6_history alter column test_number2 drop not null;
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history6_history');
|
||||
alter table migtest_e_softdelete add column deleted boolean default false not null;
|
||||
alter table migtest_oto_child add column master_id bigint;
|
||||
alter table table_history alter column textfield drop not null;
|
||||
alter table table_history add column "select" varchar(255);
|
||||
alter table table_history add column textfield2 varchar(255);
|
||||
call sysproc.admin_cmd('reorg table table_history');
|
||||
-- apply post alter
|
||||
alter table migtest_e_basic add constraint ck_migtest_e_basic_status check ( status in ('N','A','I','?'));
|
||||
create unique index uq_migtest_e_basic_description on migtest_e_basic(description) exclude null keys;
|
||||
@@ -232,3 +238,4 @@ alter table migtest_oto_child add constraint fk_migtest_oto_child_master_id fore
|
||||
|
||||
create index ix_migtest_e_basic_indextest3 on migtest_e_basic (indextest3);
|
||||
create index ix_migtest_e_basic_indextest6 on migtest_e_basic (indextest6);
|
||||
create index ix_table_textfield2 on "table" (textfield2);
|
||||
|
||||
@@ -147,6 +147,13 @@ if exists (select indname from syscat.indexes where indschema = current_schema a
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select indname from syscat.indexes where indschema = current_schema and ucase(indname) = 'IX_TABLE_TEXTFIELD2') then
|
||||
prepare stmt from 'drop index ix_table_textfield2';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
-- apply changes
|
||||
create table "migtest_QuOtEd" (
|
||||
id varchar(255) not null,
|
||||
@@ -200,9 +207,11 @@ alter table migtest_e_history2 alter column test_string drop default;
|
||||
alter table migtest_e_history2 alter column test_string drop not null;
|
||||
alter table migtest_e_history2 add column obsolete_string1 varchar(255);
|
||||
alter table migtest_e_history2 add column obsolete_string2 varchar(255);
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history2');
|
||||
alter table migtest_e_history2_history alter column test_string drop not null;
|
||||
alter table migtest_e_history2_history add column obsolete_string1 varchar(255);
|
||||
alter table migtest_e_history2_history add column obsolete_string2 varchar(255);
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history2_history');
|
||||
alter table migtest_e_history4 alter column test_number set data type integer;
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history4');
|
||||
alter table migtest_e_history4_history alter column test_number set data type integer;
|
||||
|
||||
@@ -4,7 +4,11 @@ alter table migtest_e_history drop versioning;
|
||||
alter table migtest_e_history drop period system_time;
|
||||
alter table migtest_e_history2 drop versioning;
|
||||
alter table migtest_e_history5 drop versioning;
|
||||
alter table "table" drop versioning;
|
||||
-- apply alter tables
|
||||
alter table "table" drop column textfield;
|
||||
alter table "table" drop column textfield2;
|
||||
call sysproc.admin_cmd('reorg table "table"');
|
||||
alter table migtest_ckey_detail drop column one_key;
|
||||
alter table migtest_ckey_detail drop column two_key;
|
||||
call sysproc.admin_cmd('reorg table migtest_ckey_detail');
|
||||
@@ -36,10 +40,14 @@ alter table migtest_e_softdelete drop column deleted;
|
||||
call sysproc.admin_cmd('reorg table migtest_e_softdelete');
|
||||
alter table migtest_oto_child drop column master_id;
|
||||
call sysproc.admin_cmd('reorg table migtest_oto_child');
|
||||
alter table table_history drop column textfield;
|
||||
alter table table_history drop column textfield2;
|
||||
call sysproc.admin_cmd('reorg table table_history');
|
||||
-- apply post alter
|
||||
drop table migtest_e_history_history;
|
||||
alter table migtest_e_history2 add versioning use history table migtest_e_history2_history;
|
||||
alter table migtest_e_history5 add versioning use history table migtest_e_history5_history;
|
||||
alter table "table" add versioning use history table table_history;
|
||||
drop table migtest_e_user;
|
||||
delimiter $$
|
||||
begin
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
1307787475, I__create_tablespaces.sql
|
||||
-1998060342, 1.0__initial.sql
|
||||
1595289592, 1.1.sql
|
||||
2058232717, 1.0__initial.sql
|
||||
-1450326352, 1.1.sql
|
||||
-1187336846, 1.2__dropsFor_1.1.sql
|
||||
-1088179698, 1.3.sql
|
||||
-1713819679, 1.4__dropsFor_1.3.sql
|
||||
1976888196, 1.3.sql
|
||||
946163478, 1.4__dropsFor_1.3.sql
|
||||
561281075, R__order_views.sql
|
||||
|
||||
|
||||
@@ -152,6 +152,7 @@ create table "table" (
|
||||
"to" varchar(255),
|
||||
"varchar" varchar(255),
|
||||
"foreign" varchar(255),
|
||||
textfield varchar(255) not null,
|
||||
constraint pk_table primary key ("index")
|
||||
);
|
||||
comment on column "table"."index" is 'this is a comment';
|
||||
|
||||
@@ -130,7 +130,10 @@ alter table "table" drop versioning;
|
||||
CALL SYSPROC.ADMIN_MOVE_TABLE(CURRENT_SCHEMA,'MIGTEST_MTM_C','TESTTS','TESTTS','TESTTS','','','','','','MOVE');
|
||||
CALL SYSPROC.ADMIN_MOVE_TABLE(CURRENT_SCHEMA,'MIGTEST_MTM_M','TSMASTER','TSMASTER','TSMASTER','','','','','','MOVE');
|
||||
-- apply alter tables
|
||||
alter table "table" alter column textfield drop not null;
|
||||
alter table "table" add column "select" varchar(255);
|
||||
alter table "table" add column textfield2 varchar(255);
|
||||
call sysproc.admin_cmd('reorg table "table"');
|
||||
alter table migtest_ckey_detail add column one_key integer;
|
||||
alter table migtest_ckey_detail add column two_key varchar(127);
|
||||
alter table migtest_ckey_parent add column assoc_id integer;
|
||||
@@ -180,7 +183,10 @@ alter table migtest_e_history6_history alter column test_number2 drop not null;
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history6_history');
|
||||
alter table migtest_e_softdelete add column deleted boolean default false not null;
|
||||
alter table migtest_oto_child add column master_id bigint;
|
||||
alter table table_history alter column textfield drop not null;
|
||||
alter table table_history add column "select" varchar(255);
|
||||
alter table table_history add column textfield2 varchar(255);
|
||||
call sysproc.admin_cmd('reorg table table_history');
|
||||
-- apply post alter
|
||||
alter table migtest_e_basic add constraint ck_migtest_e_basic_status check ( status in ('N','A','I','?'));
|
||||
create unique index uq_migtest_e_basic_description on migtest_e_basic(description) exclude null keys;
|
||||
@@ -232,3 +238,4 @@ alter table migtest_oto_child add constraint fk_migtest_oto_child_master_id fore
|
||||
|
||||
create index ix_migtest_e_basic_indextest3 on migtest_e_basic (indextest3);
|
||||
create index ix_migtest_e_basic_indextest6 on migtest_e_basic (indextest6);
|
||||
create index ix_table_textfield2 on "table" (textfield2);
|
||||
|
||||
@@ -147,6 +147,13 @@ if exists (select indname from syscat.indexes where indschema = current_schema a
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
delimiter $$
|
||||
begin
|
||||
if exists (select indname from syscat.indexes where indschema = current_schema and ucase(indname) = 'IX_TABLE_TEXTFIELD2') then
|
||||
prepare stmt from 'drop index ix_table_textfield2';
|
||||
execute stmt;
|
||||
end if;
|
||||
end$$;
|
||||
-- apply changes
|
||||
create table "migtest_QuOtEd" (
|
||||
id varchar(255) not null,
|
||||
@@ -200,9 +207,11 @@ alter table migtest_e_history2 alter column test_string drop default;
|
||||
alter table migtest_e_history2 alter column test_string drop not null;
|
||||
alter table migtest_e_history2 add column obsolete_string1 varchar(255);
|
||||
alter table migtest_e_history2 add column obsolete_string2 varchar(255);
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history2');
|
||||
alter table migtest_e_history2_history alter column test_string drop not null;
|
||||
alter table migtest_e_history2_history add column obsolete_string1 varchar(255);
|
||||
alter table migtest_e_history2_history add column obsolete_string2 varchar(255);
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history2_history');
|
||||
alter table migtest_e_history4 alter column test_number set data type integer;
|
||||
call sysproc.admin_cmd('reorg table migtest_e_history4');
|
||||
alter table migtest_e_history4_history alter column test_number set data type integer;
|
||||
|
||||
@@ -4,7 +4,11 @@ alter table migtest_e_history drop versioning;
|
||||
alter table migtest_e_history drop period system_time;
|
||||
alter table migtest_e_history2 drop versioning;
|
||||
alter table migtest_e_history5 drop versioning;
|
||||
alter table "table" drop versioning;
|
||||
-- apply alter tables
|
||||
alter table "table" drop column textfield;
|
||||
alter table "table" drop column textfield2;
|
||||
call sysproc.admin_cmd('reorg table "table"');
|
||||
alter table migtest_ckey_detail drop column one_key;
|
||||
alter table migtest_ckey_detail drop column two_key;
|
||||
call sysproc.admin_cmd('reorg table migtest_ckey_detail');
|
||||
@@ -36,10 +40,14 @@ alter table migtest_e_softdelete drop column deleted;
|
||||
call sysproc.admin_cmd('reorg table migtest_e_softdelete');
|
||||
alter table migtest_oto_child drop column master_id;
|
||||
call sysproc.admin_cmd('reorg table migtest_oto_child');
|
||||
alter table table_history drop column textfield;
|
||||
alter table table_history drop column textfield2;
|
||||
call sysproc.admin_cmd('reorg table table_history');
|
||||
-- apply post alter
|
||||
drop table migtest_e_history_history;
|
||||
alter table migtest_e_history2 add versioning use history table migtest_e_history2_history;
|
||||
alter table migtest_e_history5 add versioning use history table migtest_e_history5_history;
|
||||
alter table "table" add versioning use history table table_history;
|
||||
drop table migtest_e_user;
|
||||
delimiter $$
|
||||
begin
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-1998060342, 1.0__initial.sql
|
||||
1595289592, 1.1.sql
|
||||
2058232717, 1.0__initial.sql
|
||||
-1450326352, 1.1.sql
|
||||
-1187336846, 1.2__dropsFor_1.1.sql
|
||||
-1088179698, 1.3.sql
|
||||
-1713819679, 1.4__dropsFor_1.3.sql
|
||||
1976888196, 1.3.sql
|
||||
946163478, 1.4__dropsFor_1.3.sql
|
||||
561281075, R__order_views.sql
|
||||
|
||||
|
||||
@@ -156,6 +156,7 @@ create table "table" (
|
||||
"to" varchar(255),
|
||||
"varchar" varchar(255),
|
||||
"foreign" varchar(255),
|
||||
textfield varchar(255) not null,
|
||||
constraint uq_table_to unique ("to"),
|
||||
constraint uq_table_varchar unique ("varchar"),
|
||||
constraint pk_table primary key ("index")
|
||||
|
||||
@@ -46,7 +46,9 @@ update migtest_e_history2 set test_string = 'unknown' where test_string is null;
|
||||
-- NOTE: table has @History - special migration may be necessary
|
||||
update migtest_e_history6 set test_number1 = 42 where test_number1 is null;
|
||||
-- apply alter tables
|
||||
alter table "table" alter column textfield set null;
|
||||
alter table "table" add column "select" varchar(255);
|
||||
alter table "table" add column textfield2 varchar(255);
|
||||
alter table migtest_ckey_detail add column one_key integer;
|
||||
alter table migtest_ckey_detail add column two_key varchar(127);
|
||||
alter table migtest_ckey_parent add column assoc_id integer;
|
||||
@@ -119,3 +121,4 @@ alter table migtest_oto_child add constraint fk_migtest_oto_child_master_id fore
|
||||
|
||||
create index ix_migtest_e_basic_indextest3 on migtest_e_basic (indextest3);
|
||||
create index ix_migtest_e_basic_indextest6 on migtest_e_basic (indextest6);
|
||||
create index ix_table_textfield2 on "table" (textfield2);
|
||||
|
||||
@@ -16,6 +16,7 @@ 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;
|
||||
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;
|
||||
-- apply changes
|
||||
create table "migtest_QuOtEd" (
|
||||
id varchar(255) not null,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
-- Migrationscripts for ebean unittest
|
||||
-- apply alter tables
|
||||
alter table "table" drop column textfield;
|
||||
alter table "table" drop column textfield2;
|
||||
alter table migtest_ckey_detail drop column one_key;
|
||||
alter table migtest_ckey_detail drop column two_key;
|
||||
alter table migtest_ckey_parent drop column assoc_id;
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
-710189690, 1.0__initial.sql
|
||||
-145836847, 1.1.sql
|
||||
-1547037623, 1.0__initial.sql
|
||||
253988246, 1.1.sql
|
||||
688811494, 1.2__dropsFor_1.1.sql
|
||||
2025934113, 1.3.sql
|
||||
80209848, 1.4__dropsFor_1.3.sql
|
||||
509168727, 1.3.sql
|
||||
255653518, 1.4__dropsFor_1.3.sql
|
||||
|
||||
|
||||
@@ -156,6 +156,7 @@ create table "table" (
|
||||
"to" varchar(255),
|
||||
"varchar" varchar(255),
|
||||
"foreign" varchar(255),
|
||||
textfield varchar(255) not null,
|
||||
constraint uq_table_to unique ("to"),
|
||||
constraint uq_table_varchar unique ("varchar"),
|
||||
constraint pk_table primary key ("index")
|
||||
@@ -254,6 +255,7 @@ create table table_history(
|
||||
"to" varchar(255),
|
||||
"varchar" varchar(255),
|
||||
"foreign" varchar(255),
|
||||
textfield varchar(255),
|
||||
sys_period_start timestamp,
|
||||
sys_period_end timestamp
|
||||
);
|
||||
|
||||
@@ -58,7 +58,9 @@ drop view migtest_e_history6_with_history;
|
||||
drop trigger table_history_upd;
|
||||
drop view table_with_history;
|
||||
-- apply alter tables
|
||||
alter table "table" alter column textfield set null;
|
||||
alter table "table" add column "select" varchar(255);
|
||||
alter table "table" add column textfield2 varchar(255);
|
||||
alter table migtest_ckey_detail add column one_key integer;
|
||||
alter table migtest_ckey_detail add column two_key varchar(127);
|
||||
alter table migtest_ckey_parent add column assoc_id integer;
|
||||
@@ -96,7 +98,9 @@ alter table migtest_e_history6 alter column test_number2 set null;
|
||||
alter table migtest_e_history6_history alter column test_number2 set null;
|
||||
alter table migtest_e_softdelete add column deleted boolean default false not null;
|
||||
alter table migtest_oto_child add column master_id bigint;
|
||||
alter table table_history alter column textfield set null;
|
||||
alter table table_history add column "select" varchar(255);
|
||||
alter table table_history add column textfield2 varchar(255);
|
||||
-- apply post alter
|
||||
alter table migtest_e_basic add constraint ck_migtest_e_basic_status check ( status in ('N','A','I','?'));
|
||||
alter table migtest_e_basic add constraint uq_migtest_e_basic_description unique (description);
|
||||
@@ -161,3 +165,4 @@ alter table migtest_oto_child add constraint fk_migtest_oto_child_master_id fore
|
||||
|
||||
create index ix_migtest_e_basic_indextest3 on migtest_e_basic (indextest3);
|
||||
create index ix_migtest_e_basic_indextest6 on migtest_e_basic (indextest6);
|
||||
create index ix_table_textfield2 on "table" (textfield2);
|
||||
|
||||
@@ -16,6 +16,7 @@ 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;
|
||||
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;
|
||||
-- apply changes
|
||||
create table "migtest_QuOtEd" (
|
||||
id varchar(255) not null,
|
||||
|
||||
@@ -9,7 +9,11 @@ drop trigger migtest_e_history2_history_upd;
|
||||
drop view migtest_e_history2_with_history;
|
||||
drop trigger migtest_e_history5_history_upd;
|
||||
drop view migtest_e_history5_with_history;
|
||||
drop trigger table_history_upd;
|
||||
drop view table_with_history;
|
||||
-- apply alter tables
|
||||
alter table "table" drop column textfield;
|
||||
alter table "table" drop column textfield2;
|
||||
alter table migtest_ckey_detail drop column one_key;
|
||||
alter table migtest_ckey_detail drop column two_key;
|
||||
alter table migtest_ckey_parent drop column assoc_id;
|
||||
@@ -30,11 +34,15 @@ alter table migtest_e_history5 drop column test_boolean;
|
||||
alter table migtest_e_history5_history drop column test_boolean;
|
||||
alter table migtest_e_softdelete drop column deleted;
|
||||
alter table migtest_oto_child drop column master_id;
|
||||
alter table table_history drop column textfield;
|
||||
alter table table_history drop column textfield2;
|
||||
-- apply post alter
|
||||
create view migtest_e_history2_with_history as select * from migtest_e_history2 union all select * from migtest_e_history2_history;
|
||||
create trigger migtest_e_history2_history_upd before update,delete on migtest_e_history2 for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
create view migtest_e_history5_with_history as select * from migtest_e_history5 union all select * from migtest_e_history5_history;
|
||||
create trigger migtest_e_history5_history_upd before update,delete on migtest_e_history5 for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
create view table_with_history as select * from "table" union all select * from table_history;
|
||||
create trigger table_history_upd before update,delete on "table" for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
drop table if exists migtest_e_user;
|
||||
drop sequence if exists migtest_e_user_seq;
|
||||
drop table if exists migtest_mtm_c_migtest_mtm_m;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
-1806036603, 1.0__initial.sql
|
||||
-1296236140, 1.1.sql
|
||||
-1854589550, 1.0__initial.sql
|
||||
1979519453, 1.1.sql
|
||||
1579867974, 1.2__dropsFor_1.1.sql
|
||||
-877392737, 1.3.sql
|
||||
116139207, 1.4__dropsFor_1.3.sql
|
||||
-285485598, 1.3.sql
|
||||
-1120611041, 1.4__dropsFor_1.3.sql
|
||||
783227075, R__multi_comments.sql
|
||||
561281075, R__order_views.sql
|
||||
|
||||
|
||||
@@ -156,6 +156,7 @@ create column table "table" (
|
||||
"to" nvarchar(255),
|
||||
"varchar" nvarchar(255),
|
||||
"foreign" nvarchar(255),
|
||||
textfield nvarchar(255) not null,
|
||||
constraint uq_table_to unique ("to"),
|
||||
constraint uq_table_varchar unique ("varchar"),
|
||||
constraint pk_table primary key ("index")
|
||||
@@ -257,6 +258,7 @@ create column table table_history (
|
||||
"to" nvarchar(255),
|
||||
"varchar" nvarchar(255),
|
||||
"foreign" nvarchar(255),
|
||||
textfield nvarchar(255) not null,
|
||||
sys_period_start timestamp,
|
||||
sys_period_end timestamp
|
||||
);
|
||||
|
||||
@@ -100,7 +100,9 @@ update migtest_e_history6 set test_number1 = 42 where test_number1 is null;
|
||||
alter table migtest_e_history6 drop system versioning;
|
||||
alter table "table" drop system versioning;
|
||||
-- apply alter tables
|
||||
alter table "table" add ("select" nvarchar(255));
|
||||
alter table "table" alter (textfield nvarchar(255));
|
||||
alter table "table" add ("select" nvarchar(255),
|
||||
textfield2 nvarchar(255));
|
||||
alter table migtest_ckey_detail add (one_key integer,
|
||||
two_key nvarchar(127));
|
||||
alter table migtest_ckey_parent add (assoc_id integer);
|
||||
@@ -130,7 +132,9 @@ alter table migtest_e_history6 alter (test_number1 integer default 42 not null,
|
||||
alter table migtest_e_history6_history alter (test_number2 integer);
|
||||
alter table migtest_e_softdelete add (deleted boolean default false not null);
|
||||
alter table migtest_oto_child add (master_id bigint);
|
||||
alter table table_history add ("select" nvarchar(255));
|
||||
alter table table_history alter (textfield nvarchar(255));
|
||||
alter table table_history add ("select" nvarchar(255),
|
||||
textfield2 nvarchar(255));
|
||||
-- apply post alter
|
||||
alter table migtest_e_basic add constraint ck_migtest_e_basic_status check ( status in ('N','A','I','?'));
|
||||
-- cannot create unique index "uq_migtest_e_basic_description" on table "migtest_e_basic" with nullable columns;
|
||||
@@ -192,3 +196,4 @@ alter table migtest_oto_child add constraint fk_migtest_oto_child_master_id fore
|
||||
|
||||
-- explicit index "ix_migtest_e_basic_indextest3" for single column "indextest3" of table "migtest_e_basic" is not necessary;
|
||||
-- explicit index "ix_migtest_e_basic_indextest6" for single column "indextest6" of table "migtest_e_basic" is not necessary;
|
||||
-- explicit index "ix_table_textfield2" for single column "textfield2" of table ""table"" is not necessary;
|
||||
|
||||
@@ -76,6 +76,13 @@ declare exit handler for sql_error_code 261 begin end;
|
||||
exec 'drop index ix_migtest_e_basic_indextest6';
|
||||
end;
|
||||
$$;
|
||||
delimiter $$
|
||||
do
|
||||
begin
|
||||
declare exit handler for sql_error_code 261 begin end;
|
||||
exec 'drop index ix_table_textfield2';
|
||||
end;
|
||||
$$;
|
||||
-- apply changes
|
||||
create column table "migtest_QuOtEd" (
|
||||
id nvarchar(255) not null,
|
||||
|
||||
@@ -7,7 +7,10 @@ drop table migtest_e_history_history cascade;
|
||||
-- apply changes
|
||||
alter table migtest_e_history2 drop system versioning;
|
||||
alter table migtest_e_history5 drop system versioning;
|
||||
alter table "table" drop system versioning;
|
||||
-- apply alter tables
|
||||
CALL usp_ebean_drop_column('"table"', 'textfield');
|
||||
CALL usp_ebean_drop_column('"table"', 'textfield2');
|
||||
CALL usp_ebean_drop_column('migtest_ckey_detail', 'one_key');
|
||||
CALL usp_ebean_drop_column('migtest_ckey_detail', 'two_key');
|
||||
CALL usp_ebean_drop_column('migtest_ckey_parent', 'assoc_id');
|
||||
@@ -26,9 +29,12 @@ CALL usp_ebean_drop_column('migtest_e_history5', 'test_boolean');
|
||||
CALL usp_ebean_drop_column('migtest_e_history5_history', 'test_boolean');
|
||||
CALL usp_ebean_drop_column('migtest_e_softdelete', 'deleted');
|
||||
CALL usp_ebean_drop_column('migtest_oto_child', 'master_id');
|
||||
CALL usp_ebean_drop_column('table_history', 'textfield');
|
||||
CALL usp_ebean_drop_column('table_history', 'textfield2');
|
||||
-- apply post alter
|
||||
alter table migtest_e_history2 add system versioning history table migtest_e_history2_history not validated;
|
||||
alter table migtest_e_history5 add system versioning history table migtest_e_history5_history not validated;
|
||||
alter table "table" add system versioning history table table_history not validated;
|
||||
drop table migtest_e_user cascade;
|
||||
drop table migtest_mtm_c_migtest_mtm_m cascade;
|
||||
drop table migtest_mtm_m_migtest_mtm_c cascade;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
-745347271, I__create_procs.sql
|
||||
1631114894, 1.0__initial.sql
|
||||
-534043487, 1.1.sql
|
||||
-2017770851, 1.0__initial.sql
|
||||
-1727762906, 1.1.sql
|
||||
1535221752, 1.2__dropsFor_1.1.sql
|
||||
483907844, 1.3.sql
|
||||
1812245353, 1.4__dropsFor_1.3.sql
|
||||
-1046661128, 1.3.sql
|
||||
1185007986, 1.4__dropsFor_1.3.sql
|
||||
1906063401, R__order_views_hana.sql
|
||||
|
||||
|
||||
@@ -156,6 +156,7 @@ create table "table" (
|
||||
"to" varchar(255),
|
||||
"varchar" varchar(255),
|
||||
"foreign" varchar(255),
|
||||
textfield varchar(255) not null,
|
||||
constraint uq_table_to unique ("to"),
|
||||
constraint uq_table_varchar unique ("varchar"),
|
||||
constraint pk_table primary key ("index")
|
||||
|
||||
@@ -46,7 +46,9 @@ update migtest_e_history2 set test_string = 'unknown' where test_string is null;
|
||||
-- NOTE: table has @History - special migration may be necessary
|
||||
update migtest_e_history6 set test_number1 = 42 where test_number1 is null;
|
||||
-- apply alter tables
|
||||
alter table "table" alter column textfield set null;
|
||||
alter table "table" add column "select" varchar(255);
|
||||
alter table "table" add column textfield2 varchar(255);
|
||||
alter table migtest_ckey_detail add column one_key integer;
|
||||
alter table migtest_ckey_detail add column two_key varchar(127);
|
||||
alter table migtest_ckey_parent add column assoc_id integer;
|
||||
@@ -119,3 +121,4 @@ alter table migtest_oto_child add constraint fk_migtest_oto_child_master_id fore
|
||||
|
||||
create index ix_migtest_e_basic_indextest3 on migtest_e_basic (indextest3);
|
||||
create index ix_migtest_e_basic_indextest6 on migtest_e_basic (indextest6);
|
||||
create index ix_table_textfield2 on "table" (textfield2);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user