Reputation: 1176
I'm using EF Core v2.2.1 for SQLite and just made a new migration, where I renamed a field in the table.
Migration code looks like
migrationBuilder.RenameColumn(
name: "OldColumnName",
table: "Table",
newName: "NewColumnName");
It creates following SQL when I apply migration:
ALTER TABLE "Table" RENAME COLUMN "OldColumnName" TO "NewColumnName";
Staring with SQLite 3.25 it is supported https://www.sqlite.org/changes.html
Enhancements the ALTER TABLE command:
Add support for renaming columns within a table using ALTER TABLE table RENAME COLUMN oldname TO newname.
Fix table rename feature so that it also updates references to the renamed table in triggers and views.
But in EF Core I receive an exception:
Error while executing SQL query on database 'MyDatabase': near "COLUMN": syntax error
Sounds like it uses old version of SQLite. How can check which version does EF Core use?
EDIT: I found a workaround, but actually my question is "how do I know which version of SQLite am I currently using?".
Upvotes: 2
Views: 842