Closed ghost closed 7 years ago
Hi Dan.
There was a breaking change a while back around some data column changes. This sounds like that issue. Best solution in this case would be to drop your local copy of the database and let it be rebuilt and seeded.
Hmmm ... I just checked and I don't have a local copy of SQL running. I thought VS always installed that. I'm working remotely so I'm not attached to the SQL instance on my domain. I'll install express and see if that resolves the issue.
It usually uses (localdb)\mssqllocaldb
OK... After uninstalling a few prior versions of SQL and SQL 2016, then reinstalling SQL Express 2016, and deleting my local repository and cloning my fork of the current GitHub code, I am able to populate the database on localdb, however, I'm still seeing a conversion type error on "Assigned'. I think there may still be an error in the mappings used.
Scratch that ... second attempt at dropping the database seems to have worked, It's not in the code... something was cached on my machine.
In case you didn’t see it, I got everything working. I think there was an issue with having installed the3 SQL2016 RC3 and the localdb instance. It didn’t show in SSMS but after uninstalling several versions of SQL and reinstall 2016 SQLExpress it was there. Unfortunately, I needed to be be dropped. But wen it regenerated the Already DB, everything was fine. I’m guessing the old DB was there but hidden in SSMS.
At any rate… all is good and the code and the install instructions are valid.
From: Steve Gordon [mailto:notifications@github.com] Sent: Wednesday, July 19, 2017 10:09 AM To: HTBox/allReady allReady@noreply.github.com Cc: Daniel C. Kline dan@klines.org; Author author@noreply.github.com Subject: Re: [HTBox/allReady] App launch in debug error - context.Database.Migrate (#2036)
It usually uses (localdb)\mssqllocaldb
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HTBox/allReady/issues/2036#issuecomment-316418005 , or mute the thread https://github.com/notifications/unsubscribe-auth/AC8ECqoXBp4inz1kBZQ5yqbkZLkRjlYpks5sPhv_gaJpZM4Oc0dl . https://github.com/notifications/beacon/AC8EChY4oSWuA7toKZkTGg1WZ4SEjyw-ks5sPhv_gaJpZM4Oc0dl.gif
In summary, if previous contributors have used SQL2016 RC3, you may have a localdb that does not appear in SSMS. The DB is probably there and causing this issue. The uninstall of previous versions of SQL and reinstallation of the SQLExpress 2016 will expose the localdb which must then be dropped and regenerated by reloading the solution in Visual Studio.
System.Data.SqlClient.SqlException occurred HResult=0x80131904 Message=Conversion failed when converting the nvarchar value 'Assigned' to data type int. The statement has been terminated. Source=Core .Net SqlClient Data Provider C:\Users\dan\Documents\GitHub\allReady\AllReadyApp\Web-App\AllReady\Startup.cs:line 201