Added basiuc install and update script
Updated install and update scripts
Added db migrations for primary keys and foreign key constraints