Feature database update versioncontrol

ironed out some structure issues and added version table to database
scripts should check that the database of correct version