Hi, I have upgraded version 5.6 to 8.6 and I have isse whe creating new migration file the platform recreates all of my existing table once more in new migration file but note that nothing changed except upgrade was done and I was testing if something was left for migration ....
Is there any way or work around that I can do to "convinced" platform that tables are already created and "add-migration" is not including them?
thank you in advanced. reP
6 Answer(s)
-
0
Hi @peteras,
Did you also upgraded your Snapshot file with AspNet Zero's latest version ? If so, reverting it back and creating a new migration might solve your problem.
-
0
Hi ismcagdas thank you for quick reply. Would you be so kind and please provide more info how to do this?
-
0
Hi,
If you commit your changes to source control you can just revert change of merge from AspNet Zero latest version for your Snapshot file. This file shouldn't be modified manually. Then, you can just run "Add-Migration" command to create a new migration.
-
0
Hi,
I have already tried this - but "Add-Migration" creates all tables once more :(. when I was resolving conflicts I have rewrite my old snapshot file with new one. When I did test migration I saw the problem so I restore old snapshot file and problem is still present.
-
0
-
0
Hi,
I was able to resolve issue. I did start once again with upgrade procedure and committing every step of the way. I was able to resolve isse to create migrattion before updating database with new version's DB changes. Now all is OK.
Thank you for your help.