[TASK] update postgres schema
added bookshelf.transaction to make inserting to db atomic
made input into database atomic