Coverage for /builds/BuildGrid/buildgrid/buildgrid/server/persistence/sql/alembic/versions/1553978c6e69_add_stream_resource_names_to_jobs.py: 76.47%

17 statements  

« prev     ^ index     » next       coverage.py v7.4.1, created at 2024-04-15 14:01 +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 stream resource names to jobs 

16 

17Revision ID: 1553978c6e69 

18Revises: bbb77b202e31 

19Create Date: 2020-07-07 16:11:37.840129 

20 

21""" 

22import sqlalchemy as sa 

23from alembic import op 

24 

25# revision identifiers, used by Alembic. 

26revision = "1553978c6e69" 

27down_revision = "bbb77b202e31" 

28branch_labels = None 

29depends_on = None 

30 

31 

32def upgrade() -> None: 

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

34 op.add_column("jobs", sa.Column("stdout_stream_name", sa.String(), nullable=True)) 

35 op.add_column("jobs", sa.Column("stdout_stream_write_name", sa.String(), nullable=True)) 

36 op.add_column("jobs", sa.Column("stderr_stream_name", sa.String(), nullable=True)) 

37 op.add_column("jobs", sa.Column("stderr_stream_write_name", sa.String(), nullable=True)) 

38 # ### end Alembic commands ### 

39 

40 

41def downgrade() -> None: 

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

43 op.drop_column("jobs", "stdout_stream_write_name") 

44 op.drop_column("jobs", "stdout_stream_name") 

45 op.drop_column("jobs", "stderr_stream_write_name") 

46 op.drop_column("jobs", "stderr_stream_name") 

47 # ### end Alembic commands ###