Develop

Better database scheme with foreign keys. Scheme could need some further rework in choosing the right primary keys (as for table 'versions': could be a combined key of bundleidentifier and version).