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

[DEV-6356] installation progress #3564

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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: 2 additions & 0 deletions server/athenian/api/models/state/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ class RepositorySet(
)
tracking_re = Column(Text(), nullable=False, default=".*", server_default=".*")
precomputed = Column(Boolean(), nullable=False, default=False, server_default="false")
precompute_started = Column(TIMESTAMP(timezone=True))
precompute_finished = Column(TIMESTAMP(timezone=True))


class UserAccount(create_time_mixin(created_at=True), Base):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""Installation progress

Revision ID: 5b3dc49a9d7b
Revises: 3557bf5f319a
Create Date: 2023-04-04 17:13:06.137518+00:00

"""
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = "5b3dc49a9d7b"
down_revision = "3557bf5f319a"
branch_labels = None
depends_on = None


def upgrade():
with op.batch_alter_table("repository_sets") as bop:
bop.add_column(sa.Column("precompute_started", sa.TIMESTAMP(timezone=True)))
bop.add_column(sa.Column("precompute_finished", sa.TIMESTAMP(timezone=True)))


def downgrade():
with op.batch_alter_table("repository_sets") as bop:
bop.drop_column("precompute_started")
bop.drop_column("precompute_finished")