Moving migration code to new class SQLiteSchema to make managing this easier.
This class is implemented in three .cpp files:
- SQLiteSchema.cpp - utils and methods to create/migrate
- SQLiteSchemaLegacyMigrations.cpp - old, existing migrations executed from the C++ level only, we should consider this to be read-only now
- SQLiteSchemaMigrations.cpp - place where we should add "new" migrations, executed from JS level on a standard migration process or on a backup database after restore.
The API on how to use and execute new migrations will be added later in this stack, publishing this first to get some initial feedback.
I added code comments in SQLiteSchema.h, but if something is unclear, I can clarify.
This code is copied and pasted between places, so there is no need to review the logic itself. I made one change, which is annotated with an inline comment.
The most important part to review here is native/cpp/CommonCpp/DatabaseManagers/SQLiteSchema.h file.
Depends on D14572
This is type I added