Closed ghost1372 closed 6 years ago
Hi @ghost1372, Did you create a Migration Update to apply you changes to database structure? You need to use "Add-Migration" command into Console Package Manager to create a database change. I had working into an example before reintegrate my project to @msallin project. But I han't time to finish yet.
this is my project after removing field i send this command update-database but i get error: Cannot access a disposed object. Object name: 'SQLiteConnection'.
@digocesar i downgraded entityframwork from 6.2 to 6.1.3 now when i send update-database i get following error: PM> update-database Specify the '-Verbose' flag to view the SQL statements being applied to the target database. No pending explicit migrations. Applying automatic migration: 201805281149059_AutomaticMigration. System.NotImplementedException: DropColumn is non-trivial and has not been implemented. See http://sqlite.org/lang_altertable.html
@digocesar ok tnx, and if you have time, look at this https://qiita.com/minoru-nagasawa/items/961f6eae809a379c1b52
hi @digocesar i created a table after that i added a new field until here everythings work fine but after that i removed that filed and when i run my app and select some data from db I expect the database to be reCreate but i get below error:
result in data loss. Set AutomaticMigrationDataLossAllowed to 'true' on your DbMigrationsConfiguration to allow application of automatic migrations even if they might cause data loss. Alternately, use Update-Database with the '-Force' option, or scaffold an explicit migration.'
my query:var query = db.Logins.Where(x => x.User == txtUser.Text && x.Pass == Hash).Any();
configuration:and mydbContext: