forked from Ericsson/codechecker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix update mode, use buildaction and source file name to detect if
the same file is analyzed and to cleanup previous results
- Loading branch information
Gyorgy Orban
committed
Jul 5, 2016
1 parent
6a7f70a
commit d31829e
Showing
8 changed files
with
156 additions
and
30 deletions.
There are no files selected for viewing
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
48 changes: 48 additions & 0 deletions
48
db_migrate/versions/30e41fdf2e85_store_analyzer_type_and_analyzed_source_.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,48 @@ | ||
"""Store analyzer type and analyzed source file to the database for each buildaction | ||
Revision ID: 30e41fdf2e85 | ||
Revises: 4e97419519b3 | ||
Create Date: 2016-07-04 15:36:26.208047 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '30e41fdf2e85' | ||
down_revision = '4e97419519b3' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
import sys | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
''' | ||
extend build_actions table with columns to identify if | ||
the results for a build_action should be deleted in update mode | ||
analyzer_type: is required to identify the analyzer which analyzer analyzed the build action | ||
analyzed_source_file: is required to identify which source file was analyzed in the build action (it is possible to contain multiple source files) | ||
''' | ||
|
||
op.add_column('build_actions', | ||
sa.Column('analyzed_source_file', | ||
sa.String(), | ||
nullable=False, | ||
server_default='') | ||
) | ||
|
||
op.add_column('build_actions', | ||
sa.Column('analyzer_type', | ||
sa.String(), | ||
nullable=False, | ||
server_default='') | ||
) | ||
|
||
|
||
def downgrade(): | ||
# downgrade is not supported | ||
sys.exit(1) |
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