bug fixes from mergine devsql and development

Fixed create table SQL; opening database in onCreate now