# Generated by Django 3.0.8 on 2020-08-03 15:29

from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ('ckk', '0246_auto_20200803_1501'),
    ]

    operations = [
        migrations.RunSQL('''update ckk_locations_users
                                set props = turn_bit_on(props::integer, 1)
                                where id in (
                                    select clu.id
                                    from (select distinct get_workshop_id(id, 'ckk_locations') id
                                          from ckk_locations) as s
                                             join ckk_locations_users clu on clu.location_id = s.id
                                    where s.id is not null)''')
    ]
