readMe_for_database.txt 690 B

123456789101112
  1. =====how to manually fix an untracked db on track by EF-CORE=====
  2. 1. Firstly, Copy the original database file for backup!!!
  3. 2. Open db by SQLite DB browser.
  4. 3. Check the table: __EFMigrationsHistory MUST NOT exists, if exists, stop and contact administrator?
  5. 4. Create a table by sql command:
  6. CREATE TABLE "__EFMigrationsHistory" ( "MigrationId" TEXT NOT NULL CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY, "ProductVersion" TEXT NOT NULL )
  7. 4. Insert a(or some, if you understand what u a doing) fake migration record by sql command:
  8. Insert into __EFMigrationsHistory values('20180626102740_InitialCreate', '3.1.1')
  9. 5. Write changes and exit database editing in SQLite DB browser.