insert last_modified,created,flags at appropriate places
insert flags update