File: 0011_add_room_features.py

package info (click to toggle)
python-django-modelcluster 6.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 508 kB
  • sloc: python: 5,026; sh: 6; makefile: 5
file content (29 lines) | stat: -rw-r--r-- 905 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Generated by Django 2.1 on 2021-12-15 12:00

from django.db import migrations, models
import modelcluster.fields

class Migration(migrations.Migration):

    dependencies = [
        ('tests', '0010_song'),
    ]

    operations = [
        migrations.CreateModel(
            name='Feature',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('desirability', models.PositiveIntegerField()),
            ],
            options={
                'ordering': ['-desirability'],
            },
        ),
        migrations.AddField(
            model_name='Room',
            name='features',
            field=modelcluster.fields.ParentalManyToManyField(blank=True, related_name='rooms', serialize=False, to='tests.Feature'),
        )
    ]