Migrate Exposed from Joda-Time to kotlinx-datetime (#81)#81
Merged
Conversation
Replace exposed-jodatime with exposed-kotlin-datetime module, migrating all datetime columns from Joda DateTime to kotlin.time.Instant via Exposed's timestamp() column type. No SQL schema migration needed since both map to PostgreSQL TIMESTAMPTZ. - Replace exposed-jodatime with exposed-kotlin-datetime in version catalog - Change all 18 datetime() columns to timestamp() in PostgresTables.kt - Add InstantExpr.kt with nowInstant() and instantExpr() helpers to bridge the kotlin.time.Instant / kotlinx.datetime.Clock gap and replace the Joda-dependent dateTimeExpr() from common-exposed-utils - Update all source files (6) and test files (3) to use nowInstant() - Add DateTimeMigrationTest with 8 tests covering timestamp round-trips, upsert behavior, instantExpr SQL expressions, and Instant arithmetic Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
apply true is the default for Gradle plugin declarations, so the explicit annotation is unnecessary. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exposed-jodatimewithexposed-kotlin-datetime, migrating all 18 datetime columns from JodaDateTimetokotlin.time.Instantvia Exposed'stimestamp()column typeInstantExpr.ktwithnowInstant()andinstantExpr()helpers to bridgekotlin.time.Instant/kotlinx.datetime.Clockand replace the Joda-dependentdateTimeExpr()from common-exposed-utilsnowInstant()instead ofDateTime.now(UTC)DateTimeMigrationTestwith 8 tests covering timestamp round-trips, upsert behavior,instantExprSQL expressions, andInstantarithmeticTIMESTAMPTZTest plan
./gradlew build -xtestcompiles with zero errors and zero warnings./gradlew check— all existing and new tests passgrep -r "org.joda.time" readingbat-core/src/returns zero resultsgrep -r "jodatime" readingbat-core/src/returns zero results./gradlew lintKotlinMain lintKotlinTestpasses🤖 Generated with Claude Code