-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tagDatabase change spec, Install komapper-annotation for check da…
…tabasechangelog.tag.
- Loading branch information
Showing
6 changed files
with
101 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
37 changes: 37 additions & 0 deletions
37
integration-test/src/main/kotlin/komapper/liquibaseEntities.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@file:Suppress("ktlint:standard:filename") | ||
|
||
package komapper | ||
|
||
import org.komapper.annotation.KomapperColumn | ||
import org.komapper.annotation.KomapperEntity | ||
import org.komapper.annotation.KomapperId | ||
import org.komapper.annotation.KomapperTable | ||
import java.time.LocalDateTime | ||
|
||
@KomapperEntity | ||
@KomapperTable(name = "databasechangelog") | ||
data class Databasechangelog( | ||
@KomapperId @KomapperColumn(name = "id") val id: String, | ||
@KomapperColumn(name = "author") val author: String, | ||
@KomapperColumn(name = "filename") val filename: String, | ||
@KomapperColumn(name = "dateexecuted") val dateexecuted: LocalDateTime, | ||
@KomapperColumn(name = "orderexecuted") val orderexecuted: Int, | ||
@KomapperColumn(name = "exectype") val exectype: String, | ||
@KomapperColumn(name = "md5sum") val md5sum: String?, | ||
@KomapperColumn(name = "description") val description: String?, | ||
@KomapperColumn(name = "comments") val comments: String?, | ||
@KomapperColumn(name = "tag") val tag: String?, | ||
@KomapperColumn(name = "liquibase") val liquibase: String?, | ||
@KomapperColumn(name = "contexts") val contexts: String?, | ||
@KomapperColumn(name = "labels") val labels: String?, | ||
@KomapperColumn(name = "deployment_id") val deploymentId: String? | ||
) | ||
|
||
@KomapperEntity | ||
@KomapperTable(name = "databasechangeloglock") | ||
data class Databasechangeloglock( | ||
@KomapperId @KomapperColumn(name = "id") val id: Int, | ||
@KomapperColumn(name = "locked") val locked: Boolean, | ||
@KomapperColumn(name = "lockgranted") val lockgranted: LocalDateTime?, | ||
@KomapperColumn(name = "lockedby") val lockedby: String? | ||
) |
This file contains 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
11 changes: 11 additions & 0 deletions
11
integration-test/src/test/kotlin/momosetkn/utils/DatabaseKomapperExtensions.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package momosetkn.utils | ||
|
||
import org.komapper.jdbc.JdbcDatabase | ||
|
||
object DatabaseKomapperExtensions { | ||
fun Database.komapperDb() = JdbcDatabase( | ||
url = this.startedContainer.jdbcUrl, | ||
user = this.startedContainer.username, | ||
password = this.startedContainer.password, | ||
) | ||
} |