Skip to content

Commit 8dac129

Browse files
committed
groupfeatures: change ignore_forward default
and switch existing groups ignore_forward from true to false(to recover the behavior from before WAZO-4082)
1 parent bedf562 commit 8dac129

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""switch existing groups ignore_forward
2+
3+
See https://wazo-dev.atlassian.net/browse/WAZO-4169
4+
5+
Revision ID: aa8651c694fc
6+
Revises: 0eb18070742c
7+
8+
"""
9+
10+
import sqlalchemy as sa
11+
12+
from alembic import op
13+
14+
15+
# revision identifiers, used by Alembic.
16+
revision = 'aa8651c694fc'
17+
down_revision = '0eb18070742c'
18+
19+
20+
def upgrade():
21+
op.execute('UPDATE groupfeatures SET ignore_forward = 0 WHERE ignore_forward = 1')
22+
op.alter_column('groupfeatures', 'ignore_forward',
23+
existing_type=sa.INTEGER(), server_default=sa.text('0'))
24+
25+
def downgrade():
26+
op.execute('UPDATE groupfeatures SET ignore_forward = 1 WHERE ignore_forward = 0')
27+
op.alter_column('groupfeatures', 'ignore_forward',
28+
existing_type=sa.INTEGER(), server_default=sa.text('1'))

0 commit comments

Comments
 (0)