class Migration(migrations.Migration):

    dependencies = [
        ('api', '0013_auto_20210217_1339'),
    ]

    operations = [
        migrations.RenameField(
            model_name='map',
            old_name='centre_latitude',
            new_name='latitude',
        ),
        migrations.RenameField(
            model_name='map',
            old_name='centre_longitude',
            new_name='longitude',
        ),
        migrations.RenameField(
            model_name='map',
            old_name='zoom_level',
            new_name='zoom',
        ),
        migrations.AlterField(
            model_name='map',
            name='style',
            field=models.ForeignKey(default=1, on_delete=models.SET(api.models.get_default_style), related_name='maps', to='api.mapstyle'),
            preserve_default=False,
        ),
    ]
Example #2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(max_length=255, unique=True)),
                ('username', models.CharField(max_length=50, unique=True)),
                ('password', models.CharField(max_length=50)),
                ('date_joined', models.DateField()),
                ('last_login', models.DateTimeField()),
                ('rapid_rating', models.IntegerField(default=600)),
                ('blitz_rating', models.IntegerField(default=600)),
                ('bullet_rating', models.IntegerField(default=600)),
                ('is_active', models.BooleanField(default=True)),
                ('staff', models.BooleanField(default=False)),
                ('admin', models.BooleanField(default=False)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fen', models.TextField()),
                ('black', models.ForeignKey(on_delete=models.SET(api.models.get_deleted_user), related_name='black_games', to=settings.AUTH_USER_MODEL)),
                ('white', models.ForeignKey(on_delete=models.SET(api.models.get_deleted_user), related_name='white_games', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='employee',
            name='supervisor',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=models.SET(
                    api.models.Employee.get_default_supervisor),
                to='api.Employee'),
        ),
    ]
Example #4
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0002_auto_20161008_1253'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='log',
            name='owner',
        ),
        migrations.AddField(
            model_name='log',
            name='user',
            field=models.ForeignKey(default=api.models.contact_default,
                                    on_delete=models.SET(
                                        api.models.contact_default),
                                    to='api.User'),
        ),
    ]
Example #5
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0012_auto_20210214_1946'),
    ]

    operations = [
        migrations.CreateModel(
            name='MapStyle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=64)),
                ('url', models.CharField(max_length=128)),
                ('min_zoom', models.IntegerField()),
                ('max_zoom', models.IntegerField()),
                ('attribution', models.CharField(max_length=128)),
            ],
        ),
        migrations.AddField(
            model_name='map',
            name='style',
            field=models.ForeignKey(null=True, on_delete=models.SET(api.models.get_default_style), related_name='maps', to='api.mapstyle'),
        ),
    ]
Example #6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('uuid',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('text', models.TextField()),
                ('thumbs_up', models.IntegerField(default=0)),
                ('pinned', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('uuid',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('text', models.TextField()),
                ('thumbs_up', models.IntegerField(default=0)),
                ('asker',
                 models.ForeignKey(on_delete=models.SET(
                     api.models.get_sentinel_user),
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('uuid',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('text', models.CharField(max_length=20)),
            ],
        ),
        migrations.AddField(
            model_name='question',
            name='tags',
            field=models.ManyToManyField(to='api.Tag'),
        ),
        migrations.AddField(
            model_name='answer',
            name='question',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='api.Question'),
        ),
        migrations.AddField(
            model_name='answer',
            name='user',
            field=models.ForeignKey(on_delete=models.SET(
                api.models.get_sentinel_user),
                                    to=settings.AUTH_USER_MODEL),
        ),
    ]
class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='GetTogetherUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date_added', models.DateTimeField(auto_now_add=True)),
                ('start_time', models.DateTimeField()),
                ('end_time', models.DateTimeField()),
                ('description', models.CharField(max_length=300)),
                ('active', models.BooleanField(default=True)),
                ('attendees',
                 models.ForeignKey(on_delete=models.SET(
                     api.models.get_sentinel_user),
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=20)),
                ('events',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='api.Event')),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date_sent', models.DateTimeField(auto_now_add=True)),
                ('date_received', models.DateTimeField(blank=True, null=True)),
                ('content', models.CharField(max_length=300)),
                ('pinned', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Membership',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date_joined', models.DateField(auto_now_add=True)),
                ('group',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Group')),
                ('person',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('person', 'group')},
            },
        ),
        migrations.AddField(
            model_name='group',
            name='members',
            field=models.ManyToManyField(through='api.Membership',
                                         to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='group',
            name='posts',
            field=models.ManyToManyField(to='api.Message'),
        ),
        migrations.AddField(
            model_name='event',
            name='posts',
            field=models.ManyToManyField(to='api.Message'),
        ),
        migrations.AddField(
            model_name='gettogetheruser',
            name='messages',
            field=models.ManyToManyField(blank=True, to='api.Message'),
        ),
        migrations.AddField(
            model_name='gettogetheruser',
            name='user_permissions',
            field=models.ManyToManyField(
                blank=True,
                help_text='Specific permissions for this user.',
                related_name='user_set',
                related_query_name='user',
                to='auth.Permission',
                verbose_name='user permissions'),
        ),
    ]