Is there a way to attach a piece of metadata to a MySQL database? I’m trying to write code to automatically update the database schema whenever a code upgrade requires it. This requires the storage of a single integer value — the schema version. I could of course create a whole table for it, but that seems like overkill for just a simple number.
Share
You can use table comments to store the version:
You’ll have to regex to get the comment from this: