From 631b8e7668a5c66286c12842f0e6d6023a6f5a3b Mon Sep 17 00:00:00 2001 From: David Douard Date: Wed, 4 Sep 2019 11:07:49 +0200 Subject: [PATCH] models: use the same declarative base class for all models This is needed to fix the db-init implementation so the debian loader (which does use the SQLBase from swh.storage) have its models declared in the MetaData used by the initialize() function. --- swh/lister/core/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/swh/lister/core/models.py b/swh/lister/core/models.py index 610e176..ce996b1 100644 --- a/swh/lister/core/models.py +++ b/swh/lister/core/models.py @@ -7,13 +7,14 @@ from datetime import datetime import logging from sqlalchemy import Column, DateTime, Integer, String -from sqlalchemy.ext.declarative import declarative_base, DeclarativeMeta +from sqlalchemy.ext.declarative import DeclarativeMeta from .abstractattribute import AbstractAttribute -logger = logging.getLogger(__name__) +from swh.storage.schemata.distribution import SQLBase -SQLBase = declarative_base() + +logger = logging.getLogger(__name__) class ABCSQLMeta(abc.ABCMeta, DeclarativeMeta):