-
Notifications
You must be signed in to change notification settings - Fork 29
Generated migration does not get added to the project. #43
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
Comments
This is quite challenging, for a few obvious reasons and some more subtle:
Having said that, I have attempted this on my fork, you can see the code here: https://github.com/DurdSoft/EFCore.FSharp/blob/db135cf8c8b44891c2281eeb3e94c9276493adb2/src/EFCore.FSharp/Migrations/Design/FSharpMigrationsScaffolder.fs#L62 It relies heavily on string matches and there would no doubt be scenarios that could cause it to trip up. I'd be interested to see what you think @isaacabraham - you probably have more experience of complex Worth noting there was a previous discussion on this here: #20 but it didn't pick up much steam. |
@DurdSoft few quick notes after briefly looking at your fork. First off, great job knocking out these getting-started issues!
|
Thank you for the link to that project, that would certainly help us with the file schema. Certainly we could look at how Ionide manages this. I'm not sure about enforcing a structure - EF is already very opinionated! However, that still leaves a few issues I can think of off the top of my head that make a holistic solution difficult:
I'm not 100% sure how this works with C#, .NET Framework and EF Core. If I remember correct, the |
I think @baronfel idea re: globbed folder is the way to go. Worst case it's a one-off move of the folder in the project hierarchy the first time and after this it'll just work. |
Migrations are created with a timestamp in the filename as is so they would be automatically sorted correctly with globbing |
After you create a migration, you have to manually add it to the solution in order for the dotnet ef migration command to work, otherwise it doesn't detect it.
The text was updated successfully, but these errors were encountered: