mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
when you count, it's usually because there are many, so this extra complication is probaly going to be required
33 lines
947 B
Python
33 lines
947 B
Python
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("bsmain", "0001_initial"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="CachedModelCount",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("app_label", models.CharField(max_length=255)),
|
|
("model_name", models.CharField(max_length=255)),
|
|
("count", models.PositiveIntegerField()),
|
|
("last_updated", models.DateTimeField(auto_now=True)),
|
|
],
|
|
options={
|
|
"unique_together": {("app_label", "model_name")},
|
|
},
|
|
),
|
|
]
|