2 ms·
Another approach I've seen used is to map the hash of your schema to an upgrade script (which would be an empty script for the latest version): while(true)
by tbrownaw 16y ago
Another approach I've seen used is to map the hash of your schema to an upgrade script (which would be an empty script for the latest version):
while(true) {
string current_version = <sha1 of the dictionary table contents>
if (!upgrade_scripts.containsKey(current_version)) {
complain_loudly()
exit(1)
} else {
string script = upgrade_scripts[current_version]
if (script.empty())
break
else
execute(script)
}
}