make metadata storage pluggable

let's stick to BOOLEAN instead of tinyint(1), which is more standard, and we already use boolean above.