Using Flyway for Database Setup in Kotlin

Опубликовано: 28 Апрель 2023
на канале: Pairing with Duncan
1,067
35

In our last episode (   • jOOQ Transactions with Kotlin Context...  ) we decided to use jOOQ (https://www.jooq.org/), rather than JetBrains Exposed for our database access, but discovered that we were using Exposed to create our tables, so we couldn't remove it straight away.

The grown-up way of creating a database schema is migrations, and no-one ever got fired for choosing Flyway (https://flywaydb.org/), so that's what we'll investigate today. By the end we are able to create the same schema as Exposed was creating, and then, as a second migration, add some constraints to the items table to reflect the reality of our data. And the transition from Exposed to jOOQ is complete!

This is part 71 of an exploration of where a Test Driven Development implementation of the Gilded Rose stock control system might take us in Kotlin. You can see the whole series as a playlist
   • All Gilded Rose Episodes  
and the code on GitHub
https://github.com/dmcg/gilded-rose-tdd

Other database-specific episodes are collected in a playlist    • Database Access  

If you like this, you’ll probably like my book Java to Kotlin, A Refactoring Guidebook
(http://java-to-kotlin.dev). It's about far more than just the syntax differences between the languages - it shows how to upgrade your thinking to a more functional style.

I have some free time between producing videos and working for team Gilded Rose. If you like these videos I'd like to work with you - please get in touch - [email protected]


Смотрите видео Using Flyway for Database Setup in Kotlin онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Pairing with Duncan 28 Апрель 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,067 раз и оно понравилось 35 людям.