Ejemplo n.º 1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('address_line_1', models.CharField(max_length=100)),
                ('address_line_2', models.CharField(max_length=100)),
                ('city', models.CharField(max_length=50)),
                ('state', models.CharField(max_length=50)),
                ('pin_code', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('contact_no', models.IntegerField()),
                ('thumbnail', models.FileField(upload_to=details.models.get_upload_file_name)),
                ('address', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='details.Address')),
            ],
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Certification',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('credential_title', models.CharField(max_length=30)),
                ('credential_id', models.CharField(max_length=100)),
                ('credential_url', models.CharField(max_length=100)),
                ('issue_date', models.DateField()),
                ('expiration_date', models.DateField()),
                ('issuing_organization', models.CharField(max_length=100)),
            ],
        ),
        migrations.AlterModelOptions(
            name='faculty',
            options={'verbose_name_plural': 'faculties'},
        ),
        migrations.AddField(
            model_name='faculty',
            name='subjects',
            field=djongo.models.fields.ArrayField(
                model_container=details.models.Topic, null=True),
        ),
        migrations.AlterField(
            model_name='faculty',
            name='department',
            field=models.CharField(choices=[('CE', 'CE'), ('IT', 'IT'),
                                            ('IC', 'IC'), ('CL', 'CL'),
                                            ('EC', 'EC'), ('CH', 'CH'),
                                            ('MH', 'MH')],
                                   default='CE',
                                   max_length=2),
        ),
        migrations.AlterField(
            model_name='faculty',
            name='faculty_id',
            field=models.CharField(max_length=7),
        ),
    ]
Ejemplo n.º 3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Vehicle',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('vehicle_type', models.CharField(max_length=50)),
                ('size', models.CharField(max_length=50)),
                ('description', models.CharField(max_length=100)),
                ('vehicle', models.CharField(max_length=50)),
                ('transmission', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Cars',
            fields=[
                ('id',
                 models.CharField(max_length=10,
                                  primary_key=True,
                                  serialize=False,
                                  unique=True)),
                ('name', models.CharField(max_length=100)),
                ('model', models.CharField(max_length=100)),
                ('age', models.IntegerField(default=18)),
                ('engine_no', models.CharField(max_length=70)),
                ('color', models.CharField(max_length=50)),
                ('fuel_type', models.CharField(max_length=100)),
                ('image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=details.models.Cars.upload_img)),
                ('vehicle',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='details.Vehicle')),
            ],
        ),
    ]
Ejemplo n.º 4
0
class Migration(migrations.Migration):

    dependencies = [
        ('details', '0013_auto_20200214_0151'),
    ]

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firstName', models.CharField(max_length=100)),
                ('lastName', models.CharField(max_length=100)),
                ('location', models.CharField(max_length=100)),
                ('age', models.IntegerField(blank=True, default=None, null=True)),
            ],
        ),
        migrations.AlterField(
            model_name='book',
            name='author',
            field=models.CharField(max_length=200, verbose_name=details.models.Author),
        ),
    ]
Ejemplo n.º 5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Award',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=30)),
                ('description', models.TextField()),
                ('issuer', models.CharField(max_length=30)),
                ('issue_date', models.DateField()),
                ('association', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Certification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('credential_title', models.CharField(max_length=30)),
                ('credential_id', models.CharField(max_length=100)),
                ('credential_url', models.CharField(max_length=100)),
                ('issue_date', models.DateField()),
                ('expiration_date', models.DateField()),
                ('issuing_organization', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Faculty',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('faculty_id', models.CharField(max_length=7)),
                ('faculty_name', models.CharField(max_length=30, null=True)),
                ('designation', models.CharField(max_length=30, null=True)),
                ('department', models.CharField(choices=[('CE', 'CE'), ('IT', 'IT'), ('IC', 'IC'), ('CL', 'CL'), ('EC', 'EC'), ('CH', 'CH'), ('MH', 'MH')], default='CE', max_length=2)),
                ('image', models.FileField(blank=True, upload_to='')),
                ('phone', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region=None)),
                ('email', models.EmailField(blank=True, max_length=254, null=True)),
                ('website', models.URLField(null=True)),
                ('office', models.CharField(max_length=30, null=True)),
                ('biography', models.TextField(null=True)),
                ('specializations', djongo.models.fields.ArrayField(model_container=details.models.Topic, model_form_class=details.models.TopicForm, null=True)),
                ('teaching_interests', djongo.models.fields.ArrayField(model_container=details.models.Topic, null=True)),
                ('faculty_type', models.CharField(max_length=10, null=True)),
            ],
            options={
                'verbose_name_plural': 'faculties',
            },
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('organization_name', models.CharField(max_length=30)),
                ('position', models.CharField(max_length=30)),
                ('description', models.TextField()),
                ('emp_type', models.CharField(max_length=30)),
                ('location', models.CharField(max_length=30)),
                ('from_date', models.DateField()),
                ('to_date', models.DateField()),
                ('is_currently_working', models.BooleanField()),
                ('faculty', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='details.Faculty')),
            ],
        ),
        migrations.CreateModel(
            name='Publication',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=30)),
                ('description', models.TextField()),
                ('publisher', models.CharField(max_length=30)),
                ('publication_date', models.DateField()),
                ('publication_url', models.URLField()),
                ('faculty', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='details.Faculty')),
            ],
        ),
        migrations.CreateModel(
            name='Qualification',
            fields=[
                ('degree', models.CharField(max_length=30)),
                ('institute', models.CharField(max_length=100)),
                ('from_year', models.IntegerField(choices=[(1980, 1980), (1981, 1981), (1982, 1982), (1983, 1983), (1984, 1984), (1985, 1985), (1986, 1986), (1987, 1987), (1988, 1988), (1989, 1989), (1990, 1990), (1991, 1991), (1992, 1992), (1993, 1993), (1994, 1994), (1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020)], default=2020, verbose_name='from year')),
                ('to_year', models.IntegerField(choices=[(1980, 1980), (1981, 1981), (1982, 1982), (1983, 1983), (1984, 1984), (1985, 1985), (1986, 1986), (1987, 1987), (1988, 1988), (1989, 1989), (1990, 1990), (1991, 1991), (1992, 1992), (1993, 1993), (1994, 1994), (1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020)], default=2020, verbose_name='to year')),
                ('field', models.CharField(max_length=30)),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('faculty', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='details.Faculty')),
            ],
        ),
        migrations.AddField(
            model_name='certification',
            name='faculty',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='details.Faculty'),
        ),
        migrations.AddField(
            model_name='award',
            name='faculty',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='details.Faculty'),
        ),
    ]