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:
parent
bd11830328
commit
631b8e7668
1 changed files with 4 additions and 3 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue