swh.lister: Remove completely references to swh.storage.schemata
Related to 56d7cff
This commit is contained in:
parent
81a31f3c06
commit
e8a67a7650
4 changed files with 8 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2015-2017 the Software Heritage developers
|
||||
# Copyright (C) 2015-2019 the Software Heritage developers
|
||||
# License: GNU General Public License version 3, or any later version
|
||||
# See top-level LICENSE file for more information
|
||||
|
||||
|
@ -7,12 +7,13 @@ from datetime import datetime
|
|||
import logging
|
||||
|
||||
from sqlalchemy import Column, DateTime, Integer, String
|
||||
from sqlalchemy.ext.declarative import DeclarativeMeta
|
||||
from sqlalchemy.ext.declarative import DeclarativeMeta, declarative_base
|
||||
from typing import Type, Union
|
||||
|
||||
from .abstractattribute import AbstractAttribute
|
||||
|
||||
from swh.storage.schemata.distribution import SQLBase
|
||||
|
||||
SQLBase = declarative_base()
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -21,8 +21,7 @@ def debian_init(db_engine, lister=None,
|
|||
|
||||
"""
|
||||
distribution_name = 'Debian'
|
||||
from swh.storage.schemata.distribution import (
|
||||
Distribution, Area)
|
||||
from swh.lister.debian.models import Distribution, Area
|
||||
|
||||
if lister is None:
|
||||
from .lister import DebianLister
|
||||
|
|
|
@ -27,10 +27,9 @@ except ImportError:
|
|||
# SQLAlchemy < 1.1
|
||||
from sqlalchemy.dialects.postgresql import JSONB as JSON
|
||||
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
SQLBase = declarative_base()
|
||||
from swh.lister.core.models import SQLBase
|
||||
|
||||
|
||||
class Distribution(SQLBase):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2017 the Software Heritage developers
|
||||
# Copyright (C) 2017-2019 the Software Heritage developers
|
||||
# License: GNU General Public License version 3, or any later version
|
||||
# See top-level LICENSE file for more information
|
||||
|
||||
|
@ -6,7 +6,7 @@ import logging
|
|||
|
||||
import click
|
||||
|
||||
from swh.storage.schemata.distribution import Distribution, Area, SQLBase
|
||||
from swh.lister.debian.models import Distribution, Area, SQLBase
|
||||
from swh.lister.debian.lister import DebianLister
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue