Skip to content

Commit

Permalink
Merge pull request #28 from MohamedHamed12/softdelete
Browse files Browse the repository at this point in the history
add hard delete soft deleted
  • Loading branch information
MohamedHamed12 authored May 15, 2024
2 parents 648d86c + 0d5b7b5 commit d678534
Show file tree
Hide file tree
Showing 69 changed files with 416 additions and 531 deletions.
69 changes: 53 additions & 16 deletions project/accounts/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by Django 5.0.3 on 2024-05-11 19:37
# Generated by Django 5.0.3 on 2024-05-15 05:22

import django.db.models.deletion
import uuid
from django.conf import settings
from django.db import migrations, models

Expand All @@ -17,13 +18,22 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name="Doctor",
fields=[
(
"deleted",
models.DateTimeField(db_index=True, editable=False, null=True),
),
(
"deleted_by_cascade",
models.BooleanField(default=False, editable=False),
),
(
"id",
models.BigAutoField(
auto_created=True,
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
verbose_name="ID",
unique=True,
),
),
("full_name", models.CharField(max_length=255)),
Expand All @@ -39,7 +49,6 @@ class Migration(migrations.Migration):
("notes", models.TextField(blank=True, null=True)),
("address", models.JSONField(blank=True, null=True)),
("phone", models.JSONField(blank=True, null=True)),
("is_deleted", models.BooleanField(default=False)),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
("speciality", models.CharField(max_length=255)),
Expand Down Expand Up @@ -68,13 +77,22 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name="Employee",
fields=[
(
"deleted",
models.DateTimeField(db_index=True, editable=False, null=True),
),
(
"deleted_by_cascade",
models.BooleanField(default=False, editable=False),
),
(
"id",
models.BigAutoField(
auto_created=True,
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
verbose_name="ID",
unique=True,
),
),
("full_name", models.CharField(max_length=255)),
Expand All @@ -90,7 +108,6 @@ class Migration(migrations.Migration):
("notes", models.TextField(blank=True, null=True)),
("address", models.JSONField(blank=True, null=True)),
("phone", models.JSONField(blank=True, null=True)),
("is_deleted", models.BooleanField(default=False)),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
(
Expand All @@ -109,13 +126,22 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name="Patient",
fields=[
(
"deleted",
models.DateTimeField(db_index=True, editable=False, null=True),
),
(
"deleted_by_cascade",
models.BooleanField(default=False, editable=False),
),
(
"id",
models.BigAutoField(
auto_created=True,
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
verbose_name="ID",
unique=True,
),
),
("full_name", models.CharField(max_length=255)),
Expand All @@ -131,7 +157,6 @@ class Migration(migrations.Migration):
("notes", models.TextField(blank=True, null=True)),
("address", models.JSONField(blank=True, null=True)),
("phone", models.JSONField(blank=True, null=True)),
("is_deleted", models.BooleanField(default=False)),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
(
Expand All @@ -155,13 +180,22 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name="UserImage",
fields=[
(
"deleted",
models.DateTimeField(db_index=True, editable=False, null=True),
),
(
"deleted_by_cascade",
models.BooleanField(default=False, editable=False),
),
(
"id",
models.BigAutoField(
auto_created=True,
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
verbose_name="ID",
unique=True,
),
),
("image", models.ImageField(upload_to="user_images")),
Expand All @@ -177,5 +211,8 @@ class Migration(migrations.Migration):
),
),
],
options={
"abstract": False,
},
),
]
131 changes: 0 additions & 131 deletions project/accounts/migrations/0002_user.py

This file was deleted.

16 changes: 0 additions & 16 deletions project/accounts/migrations/0003_delete_user.py

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit d678534

Please # to comment.