[Question] How to do migrations
See original GitHub issueHow do you do migrations in this project?
Based on the clean architecture repo (https://github.com/jasontaylordev/CleanArchitecture) I tried this PS C:\TMP\Blazor\MVP\BlazorClean> dotnet ef migrations add "itemv1" --project src\Infrastructure --startup-project src\Blazor.Server.UI --output-dir Migrators.MSSQL\Migrations
Resulting in error Your target project 'CleanArchitecture.Blazor.Infrastructure' doesn't match your migrations assembly 'CleanArchitecture.Blazor.Migrators.MSSQL'. Either change your target project or change your migrations assembly.
How should the command be for MSSQL?
Issue Analytics
- State:
- Created 3 months ago
- Comments:7
Top Results From Across the Web
11 Questions You Should Be Asking About Data Migration
The 11 Data Migration Questions to Ask & Answers to Expect · Question 1: Who needs to be involved in the process? ·...
Read more >Frequently Asked Questions On Database Migrations
The following are some questions to ask: Which objects do I want to migrate? Are my data types compatible with those covered by...
Read more >7 Questions to Ask Before Migrating Data to Your New…
Ask yourself these 7 questions if you're considering a data migration from one venue management software to another, so you don't waste your...
Read more >Questions to Ask Before Migrating Your Database: A Guide
5 good questions to ask before migrating your database (and answers too) · 1. What's the source and what's the target? · 2....
Read more >Moving Stories Interview Questions: My Moving Story
Who did you come with and who did you leave behind? · What was the most difficult part about leaving? · What was...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Geen probleem! 😃
@neozhu, I will update the readme somewhere soon, so it’s more clear on how to create migrations. I had the same issue in the beginning, so if we improve the documentation on how to do so, it should be more clear for new users!
Hey @jochem4207,
There are multiple options you could use.
Option 1 (Command Line)
Try using the following command, and make sure to replace
yourMigrationName
with the name you want to give the migration, so in your case, probablyitemv1
.Option 2 (Visual Studio)
However don’t change the settings to
PostgreSQL
, since this screenshot is on how to create a migration when usingPostgreSQL
, but you should get a general idea of how to create a migration.Option 3 (Rider)
Entity Framework Core UI
plugin.Tools
, thenEntity Framework Core
, and thenAdd Migration
.4. Click on
OK
I hope this helps, and otherwise, let me know!
Kind regards, Bram (Je landgenoot 😊)