Add timestamps for record creation and updates for all models
This commit is contained in:
parent
63f95a73db
commit
9b0f5153fc
3 changed files with 145 additions and 2 deletions
|
|
@ -0,0 +1,85 @@
|
|||
# Generated by Django 5.2.5 on 2025-09-04 21:00
|
||||
|
||||
import django.utils.timezone
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('twitch', '0007_remove_game_unique_game_slug'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='dropcampaign',
|
||||
old_name='created_at',
|
||||
new_name='added_at',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='dropbenefit',
|
||||
name='added_at',
|
||||
field=models.DateTimeField(auto_now_add=True, db_index=True, default=django.utils.timezone.now, help_text='Timestamp when this benefit record was created.'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='dropbenefit',
|
||||
name='updated_at',
|
||||
field=models.DateTimeField(auto_now=True, help_text='Timestamp when this benefit record was last updated.'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='dropbenefitedge',
|
||||
name='added_at',
|
||||
field=models.DateTimeField(auto_now_add=True, db_index=True, default=django.utils.timezone.now, help_text='Timestamp when this drop-benefit edge was created.'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='dropbenefitedge',
|
||||
name='updated_at',
|
||||
field=models.DateTimeField(auto_now=True, help_text='Timestamp when this drop-benefit edge was last updated.'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='game',
|
||||
name='added_at',
|
||||
field=models.DateTimeField(auto_now_add=True, db_index=True, default=django.utils.timezone.now, help_text='Timestamp when this game record was created.'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='game',
|
||||
name='updated_at',
|
||||
field=models.DateTimeField(auto_now=True, help_text='Timestamp when this game record was last updated.'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='notificationsubscription',
|
||||
name='added_at',
|
||||
field=models.DateTimeField(auto_now_add=True, db_index=True, default=django.utils.timezone.now),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='notificationsubscription',
|
||||
name='updated_at',
|
||||
field=models.DateTimeField(auto_now=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='organization',
|
||||
name='added_at',
|
||||
field=models.DateTimeField(auto_now_add=True, db_index=True, default=django.utils.timezone.now, help_text='Timestamp when this organization record was created.'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='organization',
|
||||
name='updated_at',
|
||||
field=models.DateTimeField(auto_now=True, help_text='Timestamp when this organization record was last updated.'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='timebaseddrop',
|
||||
name='added_at',
|
||||
field=models.DateTimeField(auto_now_add=True, db_index=True, default=django.utils.timezone.now, help_text='Timestamp when this time-based drop record was created.'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='timebaseddrop',
|
||||
name='updated_at',
|
||||
field=models.DateTimeField(auto_now=True, help_text='Timestamp when this time-based drop record was last updated.'),
|
||||
),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue