use declarative_base for all ORM models

This rewrites the entire model base as declarative models.
This allows us to more easily customize overlay fields
in tables and is more common.

This effort also brought some DB violations to light which
this commit addresses.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-06-06 22:45:40 -07:00
parent 7f7a975614
commit 888cf5118a
29 changed files with 398 additions and 292 deletions

View file

@ -25,7 +25,7 @@ def setup():
AccountType.AccountType == "User").first()
user = create(User, Username="test", Email="test@example.org",
RealName="Test User", Passwd="testPassword",
account_type=account_type)
AccountType=account_type)
group = create(Group, Name="Test Group")
pkgbase = create(PackageBase, Name="test-package", Maintainer=user)