Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/npm/models.py
# Copyright (C) 2018 the Software Heritage developers | # Copyright (C) 2018 the Software Heritage developers | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from sqlalchemy import Column, String, DateTime, Integer, BigInteger, Sequence | from sqlalchemy import Column, String, DateTime, Integer, BigInteger, Sequence | ||||
from sqlalchemy.ext.declarative import declarative_base | |||||
from swh.lister.core.models import IndexingModelBase, ABCSQLMeta | from swh.lister.core.models import IndexingModelBase, SQLBase, ABCSQLMeta | ||||
SQLBase = declarative_base() | |||||
class NpmVisitModel(SQLBase, metaclass=ABCSQLMeta): | class NpmVisitModel(SQLBase, metaclass=ABCSQLMeta): | ||||
"""Table to store the npm registry state at the time of a | """Table to store the npm registry state at the time of a | ||||
content listing by Software Heritage | content listing by Software Heritage | ||||
""" | """ | ||||
__tablename__ = 'npm_visit' | __tablename__ = 'npm_visit' | ||||
Show All 20 Lines |