Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor evaluation logic #286

Merged
merged 4 commits into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"""migrate to usage of evaluation violations

Revision ID: 312aff72b275
Revises: 45c7a349db68
Create Date: 2021-12-15 15:53:46.484775

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = "312aff72b275"
down_revision = "45c7a349db68"
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column("evaluations", sa.Column("violations", sa.JSON(), nullable=True))
op.drop_column("evaluations", "details")
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column(
"evaluations",
sa.Column(
"details",
postgresql.ARRAY(sa.VARCHAR()),
autoincrement=False,
nullable=True,
),
)
op.drop_column("evaluations", "violations")
# ### end Alembic commands ###
2 changes: 1 addition & 1 deletion fidesctl/src/fidesapi/sql_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class Evaluation(SqlAlchemyBase):

fides_key = Column(String, primary_key=True, index=True, unique=True)
status = Column(String)
details = Column(ARRAY(String))
violations = Column(JSON)
message = Column(String)


Expand Down
Loading