In a changing application I want to verify, that the expected schema is indeed the schema of the DB.
First I've stored a schema version in an additional meta-table, but forgot to update this version sometimes when the schema changed.
Now I'm considering to generate a hash value of the schema (simple concatination of all tablenames and column names should suffice) and store it as the version.
Would it work? Is there an easier way, in particular for SQLite?
Aucun commentaire:
Enregistrer un commentaire