Add support for non-integer User class primary key

Added a little introspection to set the `user_id` column type of the transaction table to that of the user class.
Rather use `sa.inspect(user_cls).primary_key[0].type`, that it is the recommended way in SQLAlchemy now.