Add functions for importing data
This commit is contained in:
24
core/migrations/0002_alter_user_options.py
Normal file
24
core/migrations/0002_alter_user_options.py
Normal file
@ -0,0 +1,24 @@
|
||||
# Generated by Django 5.1.4 on 2024-12-16 18:28
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from django.db.migrations.operations.base import Operation
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
"""This migration alters the options of the User model to order by username."""
|
||||
|
||||
dependencies: list[tuple[str, str]] = [
|
||||
("core", "0001_initial"),
|
||||
]
|
||||
|
||||
operations: list[Operation] = [
|
||||
migrations.AlterModelOptions(
|
||||
name="user",
|
||||
options={"ordering": ["username"]},
|
||||
),
|
||||
]
|
48
core/migrations/0003_alter_benefit_created_at_and_more.py
Normal file
48
core/migrations/0003_alter_benefit_created_at_and_more.py
Normal file
@ -0,0 +1,48 @@
|
||||
# Generated by Django 5.1.4 on 2024-12-16 18:31
|
||||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from django.db.migrations.operations.base import Operation
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
"""This migration alters the created_at field on the Benefit, DropCampaign, Owner, and TimeBasedDrop models."""
|
||||
|
||||
dependencies: list[tuple[str, str]] = [
|
||||
("core", "0002_alter_user_options"),
|
||||
]
|
||||
|
||||
operations: list[Operation] = [
|
||||
migrations.AlterField(
|
||||
model_name="benefit",
|
||||
name="created_at",
|
||||
field=models.DateTimeField(
|
||||
auto_now_add=True,
|
||||
default=datetime.datetime(2024, 12, 16, 18, 31, 14, 851533, tzinfo=datetime.UTC),
|
||||
),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="dropcampaign",
|
||||
name="created_at",
|
||||
field=models.DateTimeField(
|
||||
auto_now_add=True,
|
||||
help_text="When the drop campaign was first added to the database.",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="owner",
|
||||
name="created_at",
|
||||
field=models.DateTimeField(auto_now_add=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="timebaseddrop",
|
||||
name="created_at",
|
||||
field=models.DateTimeField(auto_now_add=True, help_text="When the drop was first added to the database."),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user