added migration for the existing database structure