Coverage for /builds/BuildGrid/buildgrid/buildgrid/server/persistence/sql/alembic/versions/bbb77b202e31_add_job_status_code.py: 90.91%

11 statements  

« prev     ^ index     » next       coverage.py v6.4.1, created at 2022-06-22 21:04 +0000

1# Copyright (C) 2020 Bloomberg LP 

2# 

3# Licensed under the Apache License, Version 2.0 (the "License"); 

4# you may not use this file except in compliance with the License. 

5# You may obtain a copy of the License at 

6# 

7# <http://www.apache.org/licenses/LICENSE-2.0> 

8# 

9# Unless required by applicable law or agreed to in writing, software 

10# distributed under the License is distributed on an "AS IS" BASIS, 

11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

12# See the License for the specific language governing permissions and 

13# limitations under the License. 

14 

15"""add job.status_code 

16 

17Revision ID: bbb77b202e31 

18Revises: 083f52d97bcb 

19Create Date: 2020-06-02 10:37:04.476179 

20 

21""" 

22from alembic import op 

23import sqlalchemy as sa 

24 

25 

26# revision identifiers, used by Alembic. 

27revision = 'bbb77b202e31' 

28down_revision = '083f52d97bcb' 

29branch_labels = None 

30depends_on = None 

31 

32 

33def upgrade(): 

34 # ### commands auto generated by Alembic - please adjust! ### 

35 op.add_column('jobs', sa.Column('status_code', sa.Integer(), nullable=True)) 

36 # ### end Alembic commands ### 

37 

38 

39def downgrade(): 

40 # ### commands auto generated by Alembic - please adjust! ### 

41 op.drop_column('jobs', 'status_code') 

42 # ### end Alembic commands ###