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

Reconcile DB models based on alembic autogenerate #725

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.7.0rc1
current_version = 2.7.0rc2
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(rc(?P<build>\d+))?
Expand Down
2 changes: 1 addition & 1 deletion orchestrator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

"""This is the orchestrator workflow engine."""

__version__ = "2.7.0rc1"
__version__ = "2.7.0rc2"

from orchestrator.app import OrchestratorCore
from orchestrator.settings import app_settings
Expand Down
8 changes: 4 additions & 4 deletions orchestrator/db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ class ProcessTable(BaseModel):
__tablename__ = "processes"

process_id = mapped_column("pid", UUIDType, server_default=text("uuid_generate_v4()"), primary_key=True, index=True)
workflow_id = mapped_column(
"workflow_id", UUIDType, ForeignKey("workflows.workflow_id", ondelete="CASCADE"), nullable=False
)
workflow_id = mapped_column("workflow_id", UUIDType, ForeignKey("workflows.workflow_id"), nullable=False)
assignee = mapped_column(String(50), server_default=Assignee.SYSTEM, nullable=False)
last_status = mapped_column(String(50), nullable=False)
last_step = mapped_column(String(255), nullable=True)
Expand Down Expand Up @@ -521,6 +519,7 @@ class SubscriptionInstanceValueTable(BaseModel):
UUIDType,
ForeignKey("subscription_instances.subscription_instance_id", ondelete="CASCADE"),
index=True,
nullable=False,
)
resource_type_id = mapped_column(
UUIDType, ForeignKey("resource_types.resource_type_id"), nullable=False, index=True
Expand Down Expand Up @@ -569,7 +568,7 @@ class SubscriptionTable(BaseModel):
status = mapped_column(String(STATUS_LENGTH), nullable=False, index=True)
product_id = mapped_column(UUIDType, ForeignKey("products.product_id"), nullable=False, index=True)
customer_id = mapped_column(String, index=True, nullable=False)
insync = mapped_column(Boolean())
insync = mapped_column(Boolean(), nullable=False)
start_date = mapped_column(UtcTimestamp, nullable=True)
end_date = mapped_column(UtcTimestamp)
note = mapped_column(Text())
Expand Down Expand Up @@ -622,6 +621,7 @@ class SubscriptionMetadataTable(BaseModel):
UUIDType,
ForeignKey("subscriptions.subscription_id", ondelete="CASCADE"),
primary_key=True,
index=True,
)
metadata_ = mapped_column("metadata", pg.JSONB(), nullable=False) # type: ignore

Expand Down
Loading