Skip to content

Commit

Permalink
Make nit changes
Browse files Browse the repository at this point in the history
  • Loading branch information
minhaminha committed Feb 27, 2024
1 parent b9676c7 commit 00e75f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions corehq/apps/cleanup/migrations/0016_add_deletedsqldoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('doc_id', models.CharField(max_length=126)),
('doc_type', models.CharField(max_length=255)),
('deleted_on', models.DateTimeField(db_index=True)),
('object_class_path', models.CharField(max_length=255)),
('domain', models.CharField(max_length=255)),
('deleted_on', models.DateTimeField(db_index=True)),
('deleted_by', models.CharField(max_length=126, null=True)),
],
options={
Expand All @@ -26,6 +26,7 @@ class Migration(migrations.Migration):
),
migrations.AddConstraint(
model_name='deletedsqldoc',
constraint=models.UniqueConstraint(fields=('doc_id', 'doc_type'), name='deletedsqldoc_unique_id_and_type'),
constraint=models.UniqueConstraint(fields=('doc_id', 'object_class_path'),
name='deletedsqldoc_unique_id_and_type'),
),
]
7 changes: 4 additions & 3 deletions corehq/apps/cleanup/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ class Meta:

class DeletedSQLDoc(models.Model):
doc_id = models.CharField(max_length=126)
doc_type = models.CharField(max_length=255)
deleted_on = models.DateTimeField(db_index=True)
object_class_path = models.CharField(max_length=255)
domain = models.CharField(max_length=255)
deleted_on = models.DateTimeField(db_index=True)
deleted_by = models.CharField(max_length=126, null=True)

class Meta:
db_table = "cleanup_deletedsqldoc"
constraints = [
models.UniqueConstraint(fields=['doc_id', 'doc_type'], name='deletedsqldoc_unique_id_and_type')
models.UniqueConstraint(fields=['doc_id', 'object_class_path'],
name='deletedsqldoc_unique_id_and_type')
]

0 comments on commit 00e75f9

Please sign in to comment.