-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend: add relationship between Action model and Copr model
with this we can get information about Actions in projects and show it to user
- Loading branch information
Showing
5 changed files
with
58 additions
and
15 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
frontend/coprs_frontend/alembic/versions/08dd42f4c304_connect_copr_to_actions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
""" | ||
Connect Copr to Actions | ||
Revision ID: 08dd42f4c304 | ||
Revises: 7d9f6f921fa0 | ||
Create Date: 2023-08-03 15:45:53.527538 | ||
""" | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '08dd42f4c304' | ||
down_revision = '7d9f6f921fa0' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.add_column('action', sa.Column('copr_id', sa.Integer(), nullable=True)) | ||
op.create_index(op.f('ix_action_copr_id'), 'action', ['copr_id'], unique=False) | ||
op.create_foreign_key(None, 'action', 'copr', ['copr_id'], ['id']) | ||
|
||
|
||
def downgrade(): | ||
op.drop_constraint(None, 'action', type_='foreignkey') | ||
op.drop_index(op.f('ix_action_copr_id'), table_name='action') | ||
op.drop_column('action', 'copr_id') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters