mirror of
https://github.com/jlengrand/exposed-wiki.git
synced 2026-03-10 08:11:18 +00:00
Migration to 0.19.1
This commit is contained in:
committed by
Andrey.Tarashevskiy
parent
92cf1929d3
commit
459a7ef606
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user