I was looking for something like this ! Very nice and simple thanks a lot ! I was aware depends on docker but I was not aware condition and DbUp package simple to use !
I love the way you have your head over the sql so we have to pay for your patreon to even see the code you're presenting in this video. If you wantus to pay, then make it an extra vid, not part of the core free video series.
I don't get the db creation you talk about at 9:26. I get "one-review-db | PostgreSQL Database directory appears to contain a database; Skipping initialization". And that's after starting from scratch removing all the containers and images, but I do get this which you don't mention "one-review-db | 2024-11-25 02:08:26.620 UTC [50] FATAL: role "postgres" does not exist"
Hi @Amichai Mantinband, thanks for the great video! I have one question though, DbUp doesn't seem to support rollback (Down) migrations. Do you think this is a problem?
Nice walkthrough! If you are already using EF, what is the difference between asking EF to run migrations on startup and using DbUp? Seems like the same thing right?
you should not run migrations at startup on any env other then dev. You run migrations before deployment and they always need to be backwards compatible.
@@PeriMCS in one of my company's products we have a microservices architecture and each service is self-executing migrations on the startup. And for years we never had an issue where we needed to downgrade the database in production because of this approach
@@PeriMCS these instances connect to the same database 😉 Whether to use this approach or not - actually it all depends on the requirements and use cases
What is advantage of this over EF Core Migrations? I didn't hear a single one mentioned in the video. I can think of several disadvantages such as more work to setup, more work to (manually???) create each migration, and less community knowledge/support available. I really don't get why I would want to use this.
Thanks Amichai. I love SQL server so much. So, how do I setup my docker compose for it, especially with those comands you specified in the depends_on section?
how do you find this compares to ef core migrations. this seems more straightforward for changes like the one you made in this video, but i wonder if it wouldn't get unwieldy for more involved changes.
Looks very promising! Will definitely consider it as a replacement for my current EF Core setups :D
I have used dbup (and it's sisters) for years too, but the docker-compose-healthy is cool! Nice takeaway!
I was looking for something like this ! Very nice and simple thanks a lot ! I was aware depends on docker but I was not aware condition and DbUp package simple to use !
I love the way you have your head over the sql so we have to pay for your patreon to even see the code you're presenting in this video. If you wantus to pay, then make it an extra vid, not part of the core free video series.
Thank you for your effort, Can you talk about profiling the application ?
I don't get the db creation you talk about at 9:26. I get "one-review-db | PostgreSQL Database directory appears to contain a database; Skipping initialization". And that's after starting from scratch removing all the containers and images, but I do get this which you don't mention "one-review-db | 2024-11-25 02:08:26.620 UTC [50] FATAL: role "postgres" does not exist"
Hi @Amichai Mantinband, thanks for the great video!
I have one question though, DbUp doesn't seem to support rollback (Down) migrations. Do you think this is a problem?
Nice walkthrough! If you are already using EF, what is the difference between asking EF to run migrations on startup and using DbUp? Seems like the same thing right?
you should not run migrations at startup on any env other then dev. You run migrations before deployment and they always need to be backwards compatible.
@@PeriMCS in one of my company's products we have a microservices architecture and each service is self-executing migrations on the startup. And for years we never had an issue where we needed to downgrade the database in production because of this approach
@@antonmartyniuk you don't downgrade db. You should always have db that works with current and previous version of your app.
@@antonmartyniuk and how you handle it when service doing migration at startup is running in multiple instances?
@@PeriMCS these instances connect to the same database 😉
Whether to use this approach or not - actually it all depends on the requirements and use cases
What is advantage of this over EF Core Migrations? I didn't hear a single one mentioned in the video. I can think of several disadvantages such as more work to setup, more work to (manually???) create each migration, and less community knowledge/support available. I really don't get why I would want to use this.
I used this in project many years ago where there wasn't an ORM. Not everyone uses ORM's.
Don't use it unless you like to write raw SQL manually to have more control. If you use an ORM like EF Core stay away from this.
Thanks Amichai. I love SQL server so much. So, how do I setup my docker compose for it, especially with those comands you specified in the depends_on section?
Very cool. How do you "diff" the old schema of the database with the new schema?
this is handled by DbUp, using a database table called SchemaVersions
@@ajdinhusic2574 This table just marks the migrated versions.
@@DanielOpitz Right, so what exactly do you mean by "diff" the schemas. And for what purpose?
How does DbUp compare to EF Core migrations, or why did you choose the first over the latter?
he is not using EF. Only then it makes sense.
Do not chose this. Use EF Core migrations.
@@meetingattender8132 this is not Or. You choose it when you write scripts.
how do you find this compares to ef core migrations. this seems more straightforward for changes like the one you made in this video, but i wonder if it wouldn't get unwieldy for more involved changes.
Thank you!
so, are we introducing a dependency to read embedded resources? :)
Hey! How do you have this copilot-like terminal autocompletion?
I think it's just Powershell
I like your videos Amichai, but don't agree with use of GUID as PK aka ClusterKey in tables.
who cares
but that means it will try to create the tables every time we run the application right? if that is the case I feel something is not right.
DbUp tracks the scripts that have already been executed in a table (SchemaVersions).
No it's just like __EFMigrationHistory of EF Core
Your. Speech. Pattern. Of. Stopping. After. Every. Word. Gets. Very. Tiring. To. Listen. To. After. A. While.
baldy
you misspelled handsome
@@amantinband Epic answer 🤣🤣🤣
@@amantinband 🤣😂