cebf9703ee91134c07ff4d322ff3b0e8fde5a085,polyaxon/db/migrations/0014_add_owner.py,Migration,Migration_1,#,20

Before Change


        ("db", "0013_auto_20181107_1718"),
    ]

    operations = [
        migrations.AddField(
            model_name="project",
            name="owner_content_type",
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to="contenttypes.ContentType"),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="project",
            name="owner_object_id",
            field=models.PositiveIntegerField(default=1),
            preserve_default=False,
        ),
        migrations.RunPython(migrate_project_owner),
        migrations.AlterField(
            model_name="project",
            name="user",
            field=models.ForeignKey(blank=True, null=True,
                                    on_delete=django.db.models.deletion.SET_NULL,
                                    related_name="projects", to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name="project",
            name="owner_content_type",
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                    to="contenttypes.ContentType"),
        ),
        migrations.AlterField(
            model_name="project",
            name="owner_object_id",
            field=models.PositiveIntegerField(),
        ),
    ]

After Change


        ("db", "0013_auto_20181107_1718"),
    ]

    operations = [
        migrations.CreateModel(
            name="Owner",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False,
                                        verbose_name="ID")),
                ("created_at", models.DateTimeField(auto_now_add=True, db_index=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("object_id", models.PositiveIntegerField()),
                ("name", models.CharField(max_length=150, unique=True, validators=[
                    django.core.validators.RegexValidator(re.compile("^[-\\w]+\\Z"),
                                                          "Enter a valid "slug" consisting of Unicode letters, numbers, underscores, or hyphens.",
                                                          "invalid")])),
                ("content_type",
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to="contenttypes.ContentType")),
            ],
            options={
                "abstract": False,
            },
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: polyaxon/polyaxon
Commit Name: cebf9703ee91134c07ff4d322ff3b0e8fde5a085
Time: 2018-11-15
Author: mouradmourafiq@gmail.com
File Name: polyaxon/db/migrations/0014_add_owner.py
Class Name: Migration
Method Name: Migration_1


Project Name: AlexsLemonade/refinebio
Commit Name: f07d4010faf96caa9f0f0d5c3020d1d4bf82d9c1
Time: 2019-12-12
Author: arielsvn@gmail.com
File Name: common/data_refinery_common/migrations/0048_processorjob_abort.py
Class Name: Migration
Method Name: Migration_1


Project Name: AlexsLemonade/refinebio
Commit Name: 5a7befe41ba05a5cd43a2154170cecefac41cf50
Time: 2019-09-25
Author: kurt.wheeler91@gmail.com
File Name: common/data_refinery_common/migrations/0039_auto_20190925_1338.py
Class Name: Migration
Method Name: Migration_1