Add models for each table in the database, plus User. Relates to #446

Basically, I went ahead and reconstructed each table in the database as
a mapping class. In addition, I recreated the User class that subclassed
Participant class previously.

There is still clean up that needs to be done here.

Signed-off-by: Joonas Bergius <joonas.bergius@gmail.com>
Made changes to the ORM-related configuration and access, added convenience methods
Moved authentication to use the ORM-based class
Added dependencies for the new ORM-based classes
Moving templates over to use the ORM classes where it makes sense
Moving some initial tests over, more to come.
Delete the (now) unnecessary table declarations
Add a default for statement, fixed typo in transferee

Signed-off-by: Joonas Bergius <joonas.bergius@gmail.com>
Remove the convenience functions, reorganize around the SQLAlchemy class
Move to using the new way for accessing the orm in models
Move change_id functionality over

Signed-off-by: Joonas Bergius <joonas.bergius@gmail.com>
Raise appropriate response based on exception raised by Participant

Signed-off-by: Joonas Bergius <joonas.bergius@gmail.com>
Use db.session directly rather than relying on convenience methods

Signed-off-by: Joonas Bergius <joonas.bergius@gmail.com>
Add convenience methods for creating/deleting all tables, for bootstrapping/testing use

Signed-off-by: Joonas Bergius <joonas.bergius@gmail.com>
Add models for each table in the database, plus User. Relates to #446

Basically, I went ahead and reconstructed each table in the database as
a mapping class. In addition, I recreated the User class that subclassed
Participant class previously.

There is still clean up that needs to be done here.

Signed-off-by: Joonas Bergius <joonas.bergius@gmail.com>
Made changes to the ORM-related configuration and access, added convenience methods
Moved authentication to use the ORM-based class
Added dependencies for the new ORM-based classes
Moving templates over to use the ORM classes where it makes sense
Moving some initial tests over, more to come.