Generated migration cannot update SQLite database.
See original GitHub issueWhen making a code first change which adds a relationship between models,
dnx ef migrations add xyz
creates a migration file which causes dnx ef database update
to fail with System.NotSupportedException: SQLite cannot support this migration operation.
A comment in SqliteMigrationsSqlGenerator would appear to indicate the issue in in migration generation.
For example, see the second commit of https://github.com/Amerdrix/SQLite-Migration. Note that all migrations have been committed as generated by tooling.
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Ruby on Rails - sqlite 3 rake migrations not updating the ...
I am using RoR (3.2.2) and SQLite 3 (1.3.5). When I initially generate a model I am able to successfully create a database....
Read more >Cant Update dataBase after Adding a new Migration In EF ...
Cant Update dataBase after Adding a new Migration In EF core Code first approach. PM> Add-Migration AddIttrackertoDatabasePhase2 Build started... ...
Read more >Fixing ALTER TABLE errors with Flask-Migrate and SQLite
The only way to do this is to generate a brand new table with the new schema and copy all the data. Alembic...
Read more >Could not update database to latest schema
Problem. This error typically occurs when you have previously upgraded, then downgraded, and then again attempted to re-upgrade Workbench.
Read more >Entity Framework Core Migrations
Command Line Update the database to a specific migration name point. Lists all available migrations. Generates a SQL script for all migrations. ...
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
I fixed this with dropping the whole database, then deleting the whole migrations folder and then just building database with adding new “InitialCreated” database. The worst part will be if you already had some input data (not from template seed file). Then you will lose this all, which in my case wasn’t there.
Thanks @faridhuseynov It worked for me too, this is a limitaion tracked in the docs. But have some work arrounds.