Colton Idle
04/10/2024, 9:18 PMval ds = HikariDataSource()
ds.driverClassName = "org.postgresql.Driver"
ds.jdbcUrl = "jdbc:<postgresql://blah:52289/railway>"
ds.username = "postgres"
ds.password = "password"
var driver: SqlDriver? = null
driver = ds.asJdbcDriver()
try {
MyDb.Schema.create(driver)
} catch (e: Exception) {
//Already created
}
database = MyDb(driver)
jw
04/10/2024, 9:30 PMjw
04/10/2024, 9:33 PMjw
04/10/2024, 9:33 PMColton Idle
04/10/2024, 9:34 PMleonhardt
04/19/2024, 1:55 PMV1__create_some_table.sqm
(note the double underscore)
• configure sqldelight to produce valid sql migrations
• configure flyway to consume/run them
we use the gradle plugin to run the migrations in local development, and containerize them to run as a job for running in deployed cloud environments.leonhardt
04/19/2024, 1:55 PMColton Idle
04/24/2024, 2:55 AM