Пример #1
0
class Migration(migrations.Migration):

    dependencies = [
        ('server', '0038_auto_20160704_1005'),
    ]

    operations = [
        migrations.CreateModel(
            name='MachineDetailPlugin',
            fields=[
                ('id', models.AutoField(verbose_name='ID',
                                        serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(unique=True, max_length=255)),
                ('description', models.TextField(null=True, blank=True)),
                ('order', models.IntegerField()),
                ('type', models.CharField(default=b'builtin', max_length=255, choices=[(b'facter', b'Facter'), (
                    b'munkicondition', b'Munki Condition'), (b'builtin', b'Built In'), (b'custom', b'Custom Script')])),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.AlterField(
            model_name='plugin',
            name='type',
            field=models.CharField(default=b'builtin', max_length=255, choices=[(b'facter', b'Facter'), (
                b'munkicondition', b'Munki Condition'), (b'builtin', b'Built In'), (b'custom', b'Custom Script')]),
        ),
        migrations.RunPython(enable_plugins),
    ]
Пример #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('server', '0028_auto_20160207_1406'),
    ]

    operations = [
        migrations.CreateModel(
            name='InstalledUpdate',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('update',
                 models.CharField(db_index=True,
                                  max_length=255,
                                  null=True,
                                  blank=True)),
                ('update_version',
                 models.CharField(db_index=True,
                                  max_length=255,
                                  null=True,
                                  blank=True)),
                ('display_name',
                 models.CharField(max_length=255, null=True, blank=True)),
                ('installed', models.BooleanField()),
                ('machine',
                 models.ForeignKey(related_name='installed_updates',
                                   to='server.Machine')),
            ],
            options={
                'ordering': ['display_name'],
            },
        ),
        migrations.AlterUniqueTogether(
            name='installedupdate',
            unique_together=set([(
                'machine',
                'update',
                'update_version',
            )]),
        ),
        # migrations.RunPython(populate_installed_items),
    ]