diff --git a/lib/debsources/migrate/012-to-013.sql b/lib/debsources/migrate/012-to-013.sql new file mode 100644 index 00000000..44e1cbaa --- /dev/null +++ b/lib/debsources/migrate/012-to-013.sql @@ -0,0 +1,5 @@ +-- Remove size constraint on packages.area +-- From varchar(8) to varchar +-- This allows "non-free-firmware" + +ALTER TABLE packages ALTER COLUMN area TYPE varchar; diff --git a/lib/debsources/models.py b/lib/debsources/models.py index 2b92a577..61e7413f 100644 --- a/lib/debsources/models.py +++ b/lib/debsources/models.py @@ -43,10 +43,6 @@ Base = declarative_base() -# used for migrations, see scripts under debsources/migrate/ -DB_SCHEMA_VERSION = 11 - - class PackageName(Base): """a source package name""" @@ -85,7 +81,7 @@ class Package(Base): index=True, nullable=False, ) - area = Column(String(8), index=True) # main, contrib, non-free, non-free-firmware + area = Column(String, index=True) # main, contrib, non-free, non-free-firmware vcs_type = Column(Enum(*VCS_TYPES, name="vcs_types")) vcs_url = Column(String) vcs_browser = Column(String) @@ -437,7 +433,6 @@ def __init__(self, suite, timestamp): class FileCopyright(Base): - __tablename__ = "copyright" id = Column(BIGINT, primary_key=True) @@ -458,7 +453,6 @@ def to_dict(self): class HistoryCopyright(Base): - __tablename__ = "history_copyright" id = Column(BIGINT, primary_key=True)