-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(infra): added updated_at to CeramicCache, modified dump script to…
… use this
- Loading branch information
1 parent
8c941a8
commit 0ffa0c3
Showing
4 changed files
with
97 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
api/ceramic_cache/migrations/0013_ceramiccache_updated_at_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Generated by Django 4.2.3 on 2023-08-21 21:42 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("ceramic_cache", "0012_alter_ceramiccache_created_at_ceramiccachelegacy"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="ceramiccache", | ||
name="updated_at", | ||
field=models.DateTimeField( | ||
default="1970-01-01T00:00:00Z", | ||
help_text="This is the timestamp that this DB record was updated (it is not necessarily the stamp issuance timestamp)", | ||
), | ||
preserve_default=False, | ||
), | ||
migrations.AlterField( | ||
model_name="ceramiccache", | ||
name="created_at", | ||
field=models.DateTimeField( | ||
auto_now_add=True, | ||
help_text="This is the timestamp that this DB record was created (it is not necessarily the stamp issuance timestamp)", | ||
null=True, | ||
), | ||
), | ||
migrations.RunSQL( | ||
"UPDATE ceramic_cache_ceramiccache SET updated_at = created_at where created_at is not null" | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters