From 459a7ef60669f4c8905b6289699d9eff8fa5f47b Mon Sep 17 00:00:00 2001 From: Tapac Date: Sat, 7 Dec 2019 11:49:43 +0300 Subject: [PATCH] Migration to 0.19.1 --- Migration-Guide.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Migration-Guide.md b/Migration-Guide.md index 89270e4..e134f5a 100644 --- a/Migration-Guide.md +++ b/Migration-Guide.md @@ -32,3 +32,28 @@ If you already use JodaTime just re-import date related functions as they become But if you want to switch from JodaTime to Java Time you have to: 1. Use `exposed-java-time` instead of `exposed-jodatime` 2. Fix your code according to a fact what `date` column will return `java.time.LocalDate` and `datetime` -> `java.time.LocalDateTime` + +## Migrating to 0.19.+ +To allow Exposed to work with Java 9 module system some classes in a `exposed-core` modules were changed their packages. +Also, `exposed-jodatime` functions/classes were moved to a new package. + +Affected classes: +`org.jetbrains.exposed.dao.EntityID` -> `org.jetbrains.exposed.dao.id.EntityID` +`org.jetbrains.exposed.dao.IdTable` -> `org.jetbrains.exposed.dao.id.IdTable` +`org.jetbrains.exposed.dao.IntIdTable` -> `org.jetbrains.exposed.dao.id.IntIdTable` +`org.jetbrains.exposed.dao.LongIdTable` -> `org.jetbrains.exposed.dao.id.LongIdTable` +`org.jetbrains.exposed.dao.UUIDTable` -> `org.jetbrains.exposed.dao.id.UUIDTable` + +As this change could hardly affect large projects we move existing classes with their original package to `exposed-dao` module, deprecate them and prepare migration steps with IntelliJ IDEA: +1. Find any of deprecated tables in your project and use `Alt+Enter` quick-fix with "Replace in the whole project". Repeat for all *IdTables. +2. Run "Edit > Find > Replace in Path..." +3. Enter `import org.jetbrains.exposed.dao.*` in a search field +4. Enter in a replace field: +``` +import org.jetbrains.exposed.dao.id.EntityID +import org.jetbrains.exposed.dao.* +``` +5. Run "Replace" in the whole project. +6. Search for `DateColumnType`, `date()`, `datetime()` and re-import them manually. +7. Run "Optimize imports" on all files in a current change list. +8. Run "Build" and fix the rest problems.