80 lines
2.6 KiB
Python
80 lines
2.6 KiB
Python
|
# Generated by Django 4.2.3 on 2023-07-22 17:31
|
||
|
|
||
|
import django.utils.timezone
|
||
|
import model_utils.fields
|
||
|
from django.db import migrations, models
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
replaces = [
|
||
|
("hostingpackages", "0007_add_disk_usage_table"),
|
||
|
("hostingpackages", "0008_add_default_for_used_kb_change_uniqueness"),
|
||
|
]
|
||
|
|
||
|
dependencies = [
|
||
|
("hostingpackages", "0006_auto_20150125_1510"),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name="CustomerPackageDiskUsage",
|
||
|
fields=[
|
||
|
(
|
||
|
"id",
|
||
|
models.AutoField(
|
||
|
auto_created=True,
|
||
|
primary_key=True,
|
||
|
serialize=False,
|
||
|
verbose_name="ID",
|
||
|
),
|
||
|
),
|
||
|
(
|
||
|
"created",
|
||
|
model_utils.fields.AutoCreatedField(
|
||
|
default=django.utils.timezone.now,
|
||
|
editable=False,
|
||
|
verbose_name="created",
|
||
|
),
|
||
|
),
|
||
|
(
|
||
|
"modified",
|
||
|
model_utils.fields.AutoLastModifiedField(
|
||
|
default=django.utils.timezone.now,
|
||
|
editable=False,
|
||
|
verbose_name="modified",
|
||
|
),
|
||
|
),
|
||
|
(
|
||
|
"source",
|
||
|
models.CharField(
|
||
|
choices=[
|
||
|
("disk", "disk"),
|
||
|
("mysql", "mysql"),
|
||
|
("pgsql", "pgsql"),
|
||
|
],
|
||
|
verbose_name="data source",
|
||
|
),
|
||
|
),
|
||
|
("item", models.CharField(verbose_name="data item")),
|
||
|
(
|
||
|
"used_kb",
|
||
|
models.PositiveBigIntegerField(
|
||
|
default=0, verbose_name="space used in KiB"
|
||
|
),
|
||
|
),
|
||
|
(
|
||
|
"package",
|
||
|
models.ForeignKey(
|
||
|
help_text="The hosting package",
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
to="hostingpackages.customerhostingpackage",
|
||
|
verbose_name="hosting package",
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
options={
|
||
|
"unique_together": {("package", "source", "item")},
|
||
|
},
|
||
|
),
|
||
|
]
|