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.
This commit is contained in:
David Douard 2019-09-04 11:07:49 +02:00
parent bd11830328
commit 631b8e7668

View file

@ -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):