-
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
57 additions
and
15 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
frontend/coprs_frontend/alembic/versions/77a33109d365_connect_actions_with_copr_project.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,27 @@ | ||
""" | ||
Connect actions with copr project | ||
Revision ID: 77a33109d365 | ||
Revises: ba6ac0936bfb | ||
Create Date: 2023-07-25 14:53:21.754927 | ||
""" | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '77a33109d365' | ||
down_revision = 'ba6ac0936bfb' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.add_column('action', sa.Column('copr_id', sa.Integer(), nullable=True)) | ||
op.create_foreign_key(None, 'action', 'copr', ['copr_id'], ['id']) | ||
|
||
|
||
def downgrade(): | ||
op.drop_constraint(None, 'action', type_='foreignkey') | ||
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