Skip to content
Snippets Groups Projects
Commit 631b8e76 authored by David Douard's avatar David Douard
Browse files

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.
parent bd118303
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment