I have one entity which has a column as int in Branch A. Now I switch to a different BranchB. There I create a migration and change column to varchar and runUpdate-Database. Now If I switch to Branch A again. If I see in the code the column datatype isint, but in the database, its datatype is varchar. But I want its datatype to be int. I can not even remove this migration from BranchA because it was created in Branch B.I can see only one way to solve this issue is to delete the database and run Update-Database, But I will lose all data by doing this. Is there any better way to solve this issue.
5 Answer(s)
-
0
Hi I think you can create a Db backup and edit your query file then attach that again. Or use VS SQL Object Explorer right click on target table then click "View Code". Then change that column type. If your data is +1000 rows I'm not sure for this solution.
-
0
If your rows is +1000 and you still want keep that, the best way for keeping that columns is changing "int" to "varchar" and use TypeConverter for new entries . You can create a excitation for that.
-
0
This has nothing to do with AspNet Zero.
-
0
Yes, its not at all related to AspNet Zero. But this is very common problem for a developer who is using AspNet Zero and working on multiple branches concurrently.
-
0
@ManojReddy use different databases for each branch.