Coverage for /builds/BuildGrid/buildgrid/buildgrid/server/persistence/sql/alembic/versions/69ceb5938c06_add_a_deleted_flag_for_indexed_cas_.py: 91.67%
12 statements
« prev ^ index » next coverage.py v6.4.1, created at 2022-06-22 21:04 +0000
« 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.
15"""Add a deleted flag for Indexed CAS entries
17Revision ID: 69ceb5938c06
18Revises: e287a533bbd7
19Create Date: 2020-03-31 13:45:29.641272
21"""
22from alembic import op
23import sqlalchemy as sa
26# revision identifiers, used by Alembic.
27revision = '69ceb5938c06'
28down_revision = 'e287a533bbd7'
29branch_labels = None
30depends_on = None
33def upgrade():
34 with op.batch_alter_table('index') as batch_op:
35 batch_op.add_column(sa.Column('deleted', sa.Boolean(), nullable=False, server_default=sa.false()))
38def downgrade():
39 op.drop_column('index', 'deleted')