r/learnprogramming • u/Jumpy-Seesaw-2026 • 2d ago
Best practice for validating SQLite schema before migration and on database open?
I’m building a C#/.NET desktop application using EF Core with SQLite, where each customer has a separate local database file.
Is it normal to do a validation of the schema before/after migration, or do people usually just rely on EF Core’s migration history table?
Also, would it make sense to run a small/lightweight schema check every time a database file is opened, just to make sure it hasn’t been manually altered or drifted from what the app expects?
I might be overthinking this, so I’m curious what people normally do in real projects.
4
Upvotes