Coverage for /builds/BuildGrid/buildgrid/buildgrid/server/sql/alembic/versions/b5563d55f4e3_jobs_create_timestamp.py: 84.62%

13 statements  

« prev     ^ index     » next       coverage.py v7.4.1, created at 2024-12-05 10:15 +0000

1# Copyright (C) 2024 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"""jobs create_timestamp 

16 

17Revision ID: b5563d55f4e3 

18Revises: 23f48374c8b6 

19Create Date: 2024-09-24 16:05:56.576915 

20 

21""" 

22import sqlalchemy as sa 

23from alembic import op 

24 

25# revision identifiers, used by Alembic. 

26revision = "b5563d55f4e3" 

27down_revision = "23f48374c8b6" 

28branch_labels = None 

29depends_on = None 

30 

31 

32def upgrade() -> None: 

33 with op.batch_alter_table("jobs") as batch_op: 

34 batch_op.add_column(sa.Column("create_timestamp", sa.DateTime(), nullable=True)) 

35 

36 

37def downgrade() -> None: 

38 with op.batch_alter_table("jobs") as batch_op: 

39 batch_op.drop_column("create_timestamp")