Script 3341bf554454_add_mageia_chroots_py
|
|
1 """add mageia chroots
2
3 Revision ID: 3341bf554454
4 Revises: 8de41eec1d1
5 Create Date: 2016-09-20 19:28:16.115630
6
7 """
8
9
10 revision = '3341bf554454'
11 down_revision = '8de41eec1d1'
12
13 from alembic import op
14 import sqlalchemy as sa
15
16
18 bind = op.get_bind()
19 connection = bind.connect()
20
21 connection.execute(
22 "INSERT INTO mock_chroot(os_release, os_version, arch, is_active) VALUES ('mageia', '6', 'x86_64', True)"
23 )
24 connection.execute(
25 "INSERT INTO mock_chroot(os_release, os_version, arch, is_active) VALUES ('mageia', '6', 'i586', True)"
26 )
27 connection.execute(
28 "INSERT INTO mock_chroot(os_release, os_version, arch, is_active) VALUES ('mageia', 'cauldron', 'x86_64', True)"
29 )
30 connection.execute(
31 "INSERT INTO mock_chroot(os_release, os_version, arch, is_active) VALUES ('mageia', 'cauldron', 'i586', True)"
32 )
33 connection.close()
34
35
37 bind = op.get_bind()
38 connection = bind.connect()
39
40 connection.execute(
41 "UPDATE mock_chroot SET is_active=False WHERE os_release = 'mageia'"
42 )
43 connection.close()
44