Skip to content

Commit

Permalink
Merge pull request #4325 from willkg/1219483-remove-exploitability-table
Browse files Browse the repository at this point in the history
fixes bug 1219483 - remove exploitability_reports table
  • Loading branch information
willkg committed Feb 7, 2018
2 parents fead237 + 5f12c9c commit 6ad6051
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""bug 1219483 remove exploitability table
Revision ID: 0f31c225e765
Revises: 0193b4725f32
Create Date: 2018-02-06 16:33:54.841669
"""

from alembic import op


# revision identifiers, used by Alembic.
revision = '0f31c225e765'
down_revision = '0193b4725f32'


def upgrade():
# Delete exploitability_table table
op.execute('DROP TABLE IF EXISTS exploitability_reports')


def downgrade():
# There is no going back.
pass
31 changes: 0 additions & 31 deletions socorro/external/postgresql/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,37 +313,6 @@ class Module(DeclarativeBase):
version = Column(u'version', TEXT(), nullable=False, primary_key=True)


class ExploitabilityReport(DeclarativeBase):
__tablename__ = 'exploitability_reports'

# column definitions
signature_id = Column(u'signature_id', INTEGER(), ForeignKey(
'signatures.signature_id'), nullable=False)
product_version_id = Column(u'product_version_id', INTEGER(), ForeignKey(
'product_versions.product_version_id'), nullable=False)
product_name = Column(u'product_name', TEXT())
version_string = Column(u'version_string', TEXT())
signature = Column(u'signature', TEXT(), nullable=False)
report_date = Column(u'report_date', DATE(), nullable=False, index=True)
null_count = Column(u'null_count', INTEGER(),
nullable=False, server_default=text('0'))
none_count = Column(u'none_count', INTEGER(),
nullable=False, server_default=text('0'))
low_count = Column(u'low_count', INTEGER(),
nullable=False, server_default=text('0'))
medium_count = Column(u'medium_count', INTEGER(),
nullable=False, server_default=text('0'))
high_count = Column(u'high_count', INTEGER(),
nullable=False, server_default=text('0'))

__mapper_args__ = {"primary_key": (
signature_id, product_version_id, report_date)}
__table_args__ = (
Index('exploitable_signature_date_idx', signature_id,
product_version_id, report_date, unique=True),
)


class RawAdiLogs(DeclarativeBase):
__tablename__ = 'raw_adi_logs'

Expand Down

0 comments on commit 6ad6051

Please sign in to comment.