mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +00:00
MariaDB uses '@@system_versioning_alter_history = 1' now. Removed obsolete "lock tables" statements
This commit is contained in:
1 parent
10c01574d2
commit
d629fb2dbd
14 files changed
+39
-62
No files matched your search
@@ -2,11 +2,9 @@ package misc.migration.v1_1;
|
||||
|
||||
|
||||
import io.ebean.annotation.DbDefault;
|
||||
import io.ebean.annotation.DbMigration;
|
||||
import io.ebean.annotation.History;
|
||||
import io.ebean.annotation.HistoryExclude;
|
||||
import io.ebean.annotation.NotNull;
|
||||
import io.ebean.annotation.Platform;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
@@ -22,13 +20,6 @@ public class EHistory2 {
|
||||
Integer id;
|
||||
|
||||
@NotNull
|
||||
// see: https://mariadb.com/de/resources/blog/use-cases-for-mariadb-data-versioning/
|
||||
@DbMigration(preAlter = {
|
||||
"SET @@system_versioning_alter_history = 1",
|
||||
"update ${table} set ${column} = 'unknown' where ${column} is null"}, platforms = Platform.MARIADB)
|
||||
|
||||
// other platforms
|
||||
@DbMigration(preAlter = "update ${table} set ${column} = 'unknown' where ${column} is null")
|
||||
@DbDefault("unknown")
|
||||
String testString;
|
||||
|
||||
|
||||
Reference in new issue
Block a user