diff --git a/mycarehub/clients/migrations/0007_auto_20211110_0453.py b/mycarehub/clients/migrations/0007_auto_20211110_0453.py new file mode 100644 index 0000000..92fbaad --- /dev/null +++ b/mycarehub/clients/migrations/0007_auto_20211110_0453.py @@ -0,0 +1,43 @@ +# Generated by Django 3.2.9 on 2021-11-10 01:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('clients', '0006_clientfacility_notes'), + ] + + operations = [ + migrations.AddField( + model_name='client', + name='deleted_at', + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AddField( + model_name='clientfacility', + name='deleted_at', + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AddField( + model_name='identifier', + name='deleted_at', + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AddField( + model_name='relatedperson', + name='deleted_at', + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AddField( + model_name='securityquestion', + name='deleted_at', + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AddField( + model_name='securityquestionresponse', + name='deleted_at', + field=models.DateTimeField(blank=True, null=True), + ), + ] diff --git a/mycarehub/common/migrations/0005_auto_20211110_0453.py b/mycarehub/common/migrations/0005_auto_20211110_0453.py new file mode 100644 index 0000000..f3bfe49 --- /dev/null +++ b/mycarehub/common/migrations/0005_auto_20211110_0453.py @@ -0,0 +1,43 @@ +# Generated by Django 3.2.9 on 2021-11-10 01:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('common', '0004_alter_auditlog_timestamp'), + ] + + operations = [ + migrations.AddField( + model_name='address', + name='deleted_at', + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AddField( + model_name='auditlog', + name='deleted_at', + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AddField( + model_name='contact', + name='deleted_at', + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AddField( + model_name='facility', + name='deleted_at', + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AddField( + model_name='facilityattachment', + name='deleted_at', + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AddField( + model_name='userfacilityallotment', + name='deleted_at', + field=models.DateTimeField(blank=True, null=True), + ), + ] diff --git a/mycarehub/common/models/base_models.py b/mycarehub/common/models/base_models.py index 4c649de..6cd7a3e 100644 --- a/mycarehub/common/models/base_models.py +++ b/mycarehub/common/models/base_models.py @@ -120,6 +120,7 @@ class OwnerlessAbstractBase(models.Model, metaclass=ValidationMetaclass): created_by = models.UUIDField(null=True, blank=True) updated = models.DateTimeField(default=timezone.now) updated_by = models.UUIDField(null=True, blank=True) + deleted_at = models.DateTimeField(null=True, blank=True) objects = OwnerlessAbstractBaseManager()