Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thinking behind having a separate Migrations Service isn't clear #1846

Open
IEvangelist opened this issue Oct 15, 2024 · 8 comments
Open

Thinking behind having a separate Migrations Service isn't clear #1846

IEvangelist opened this issue Oct 15, 2024 · 8 comments
Assignees
Labels
database Content related to database. in-pr Pri3

Comments

@IEvangelist
Copy link
Member

IEvangelist commented Oct 15, 2024

Watch this video and update the docs in question, with related/relevant information.

Summary by @CamSoper:

  • Critical that Connect to SQL doc, EF Migrations doc, and EF Seeding doc are separate docs.

  • Critical that per EF Migrations doc (which was in turn based on this sample), we show a separate Migrations service that runs once and shuts down.

  • Builds a demo that is more or less exactly the same as what we show in the three docs, except they put the migration/seeding logic in the application code itself.

  • Shows how to connect SSMS to the SQL Server container and view the database.

@dotnetrepoman dotnetrepoman bot added the ⌚ Not Triaged Not triaged label Oct 15, 2024
@CamSoper CamSoper changed the title YouTube video - feedback. Thinking behind having a separate Migrations Service isn't clear Oct 15, 2024
@CamSoper
Copy link
Contributor

@JamesNK I made a doc using your sample but we've heard some feedback that they don't see why the migrations need to live in their own separate service. Do we have any guidance on that?

Regarding connecting a DBMS client of some kind, I'd like a doc like that but the way he did it was by manually setting the password in his dev environment with dotnet secrets. Do we have any feedback on that? @IEvangelist? @JamesNK?

@alistairmatthews
Copy link
Contributor

#2673 adds data volumes and data persistence to the EF tutorial. That addresses one of the complaints raised in the video linked above. @JamesNK - I didn't implement a secret password as suggested in the video as it worked without one. Let me know if you think that would be helpful.

@alistairmatthews
Copy link
Contributor

@JamesNK also, could you give me a clue about why we have migrations in a worker service in this tutorial?

If that's the best place for them, I think we should add some text explaining why. Thanks!

@CamSoper
Copy link
Contributor

@alistairmatthews As I remember it, when I wrote this doc based on James' sample, the explanation was:

  1. Since databases at dev time are ephemeral, migrations have to be run every time, and
  2. Putting them in a separate service makes it more maintainable, separation of concerns, etc.

@CamSoper
Copy link
Contributor

Can... can I assign this to you, @alistairmatthews? It was assigned to me when I was doing more Aspire stuff but my focus has changed a bit.

@alistairmatthews
Copy link
Contributor

Thanks for the info @CamSoper - yes, please assign this one to me.

@CamSoper
Copy link
Contributor

Done.

It's very nice to be working with you again! I sang your praises to my manager last week when I was asking for some writing help. 😁

@alistairmatthews
Copy link
Contributor

alistairmatthews commented Feb 27, 2025

Glad to hear that! We have capacity if he/she needs help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Content related to database. in-pr Pri3
Projects
None yet
Development

No branches or pull requests

3 participants