some fixes
migrated test database to sqlite due to missing cascade support