Changed flush buffers to match new database

Should be very easy to add new metadata fields in the future, no
server-side changes necessary.