add some Catalog field indexes
This commit is contained in:
23
procat2/migrations/0004_auto_20190424_0000.py
Normal file
23
procat2/migrations/0004_auto_20190424_0000.py
Normal file
@ -0,0 +1,23 @@
|
||||
# Generated by Django 2.2 on 2019-04-24 00:00
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('procat2', '0003_auto_20190423_2203'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='catalog',
|
||||
name='public',
|
||||
field=models.BooleanField(db_index=True, default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='catalog',
|
||||
name='updated',
|
||||
field=models.DateTimeField(auto_now=True, db_index=True),
|
||||
),
|
||||
]
|
||||
@ -21,9 +21,9 @@ class Catalog(models.Model):
|
||||
season = models.ForeignKey(Season, on_delete=models.PROTECT)
|
||||
region = models.ForeignKey(Region, on_delete=models.PROTECT)
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
updated = models.DateTimeField(auto_now=True)
|
||||
updated = models.DateTimeField(auto_now=True, db_index=True)
|
||||
name = models.CharField(max_length=300)
|
||||
public = models.BooleanField(default=False)
|
||||
public = models.BooleanField(default=False, db_index=True)
|
||||
pages = models.PositiveIntegerField(default=0)
|
||||
sections = models.PositiveIntegerField(default=0)
|
||||
materials = models.PositiveIntegerField(default=0)
|
||||
|
||||
Reference in New Issue
Block a user