summaryrefslogtreecommitdiff
path: root/ausbutler/model.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-01-06 00:03:50 +0100
committeremkael <emkael@tlen.pl>2017-01-06 00:03:50 +0100
commitf454689117d3a7f3bacec136e53eff6e81716bf0 (patch)
tree4c21537a44faa30f1e73388dc13c61ae4a22014f /ausbutler/model.py
parentd2ef0b2535e944c65498a85bb1b7c9981c7d0237 (diff)
Merging DB parameters from two tables
Diffstat (limited to 'ausbutler/model.py')
-rw-r--r--ausbutler/model.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/ausbutler/model.py b/ausbutler/model.py
index fc088fa..d3e4c27 100644
--- a/ausbutler/model.py
+++ b/ausbutler/model.py
@@ -1,5 +1,5 @@
from cached_property import cached_property
-from sqlalchemy import Column, MetaData, Table, func
+from sqlalchemy import Column, MetaData, Table, func, join, literal
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.types import Float, Integer, String
@@ -82,3 +82,11 @@ class Admin(Base):
__table__ = Table('admin', MetaData(bind=session.bind),
Column('shortname', String, primary_key=True),
autoload=True)
+
+class Params(Base):
+ __table__ = Table('params', MetaData(bind=session.bind),
+ Column('datasource', Integer, primary_key=True),
+ autoload=True)
+
+class Parameters(Base):
+ __table__ = join(Admin, Params, literal(True))