Implementing database for editing posts