updated database schema to store closed/locked data