SchemaHero - Database Schema Migrations Inside Kubernetes

preview_player
Показать описание
Can we incorporate database schema migrations into our processes? Can we do it in a Kubernetes-native way and through GitOps tools like Argo CD or Flux? Can SchemaHero be the solution? It works with PostgreSQL, MySQL, CockroachDB, Cassandra, and SQLite (with more to come).

#SchemaHero #Database #Kubernetes #k8s

▬▬▬▬▬▬ 🔗 Additional Info 🔗 ▬▬▬▬▬▬

▬▬▬▬▬▬ ⏱ Timecodes ⏱ ▬▬▬▬▬▬
00:00 Database schema migrations
02:24 Installing SchemaHero
05:49 Configuring database connection
08:39 Creating tables
12:12 Altering tables
14:58 Rolling back table changes
16:13 Should you use SchemaHero?

▬▬▬▬▬▬ 🚀 Courses, books, and podcasts 🚀 ▬▬▬▬▬▬

▬▬▬▬▬▬ 👋 Contact me 👋 ▬▬▬▬▬▬
Рекомендации по теме
Комментарии
Автор

How do you manage your DB schemas (in case your DB does have a schema)?

DevOpsToolkit
Автор

Clearly in my top 5 youtube influencer !!
Thank you for this great video (and for all others :) )

soubinan
Автор

I was initially excited by the title but this doesn't appear to apply to my use case. How would this work with frameworks that manages their own migrations - like Django - if it even does? Currently you can use an initContainer or job to apply the migration, but I don't like either way. Definitely would like more DB/Postgresql related videos.

IIGrudge
Автор

This is AWESOME and will fix a lot of my personal issue with database migrations using GitOps. I was wondering how/if this can be coupled with ArgoCD? I already have my applications deployed with ArgoCD and this will be the missing piece to my setup. Thanks!

tinita
Автор

What about existing tables? do we need to yamlify all existing tables? I think this could be for the users who about to start and setup there CICD processes. For now we are using k8s jobs for migrations but I would eventually like a better approach. To use this I guess first we need to make the database git based using yaml and then start using it?

zahirshah
Автор

Great Content !. Like all your videos. One question viktor. Is there a similar kind of k8s native tool for application testing ? . Test cases defined using YAMLs and a 'test' controller picks these test cases and run.

geowalrus
Автор

Another very good and useful video. Thank you
But an important question is backups. How can we sync database backups and k8s resources in a recovery use case?

FernandoAlmeida
Автор

Couple of questions:
- What about more complex database objects, like Views, Materialized Views, Enums, Custom Types, Database Stored Procedures and Functions, Triggers, ... how good is SchemaHero in finding out differences in their versions in order to figure out a migration to apply? Changes in these database objects sometimes means that the whole objects need to be dropped and recreated, along with cascading to all the dependencies and the dependencies might be objects that are slow to recreate, like materialized views. In my opinion, fully automating database schema migrations with only specifying a target state is still not very practical for complex database schemas and the schemas with a lot of data.
- Does SchemaHero helps in eventually blocking all the traffic from our application to the database (and maybe even to our application that depends on our database and resides in the same Kubernetes cluster) while database migrations are being applied? Complex database migrations can be lengthy and may lock the tables, making the database unusable while migrations are being applied.
- Would very much like to hear your opinion about the Flyway. My personal opinion is that it is useful in automating database migrations for Project and PaaS business models (where there is only one production environment), while it has serious problems and is not very usable in Product business model where there are many production environments, each one for each customer and on the potentially different version (i.e. when each customer has different release approval policies).

miletacekovic
Автор

Ok but how do you integrate Sql server migration scripts in this kind of json format?

pigrebanto
Автор

Cool finding! I found liquibase and flyway very useful if you use java application because the nature of the language and the easy integration. However I found this tool useful for other languages that don`t have this integration by default and need exterrnal database life cycle way

javisartdesign
Автор

Can i use schemaHero in a multi-tenant architecture to share Database schema usage between tenants ?

yassinemessaoud
Автор

The thing that bothers me about SchemaHero is that now my schema migrations is Kubernetes aware. I’d rather have migrations that are agnostic of where it is running just like my app code is unaware of Kubernetes. That way I can run them locally to test without needing to spin up a k8s cluster.

MarkMaglana
Автор

Somehow the workflow of developing features with this seems weird to me. As you mentioned, app and db management need to be decoupled to be able to use SchemaHero. Is it a good pattern to decouple schema management from the app using it?

sticksen