mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
10 lines
222 B
Python
10 lines
222 B
Python
from sqlalchemy.ext.declarative import declarative_base
|
|
|
|
import aurweb.db
|
|
|
|
Base = declarative_base()
|
|
Base.__table_args__ = {
|
|
"autoload": True,
|
|
"autoload_with": aurweb.db.get_engine(),
|
|
"extend_existing": True
|
|
}
|