Skip to content

Commit

Permalink
Redo the migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Feb 2, 2024
1 parent 56cdab8 commit 0f1fe16
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 230 deletions.
24 changes: 12 additions & 12 deletions backend/donations/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Generated by Django 4.2.9 on 2024-01-27 08:54
# Generated by Django 4.2.9 on 2024-02-02 12:06

from django.db import migrations, models
import django.db.models.deletion
import django.db.models.functions.text
import django_cryptography.fields
import donations.models.main
import functools


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand All @@ -21,17 +21,13 @@ class Migration(migrations.Migration):
("first_name", models.CharField(blank=True, default="", max_length=100, verbose_name="first name")),
("last_name", models.CharField(blank=True, default="", max_length=100, verbose_name="last name")),
("initial", models.CharField(blank=True, default="", max_length=5, verbose_name="initials")),
(
"cnp",
django_cryptography.fields.encrypt(
models.CharField(blank=True, default="", max_length=13, verbose_name="CNP")
),
),
("encrypted_cnp", models.TextField(blank=True, default="", verbose_name="CNP")),
("city", models.CharField(blank=True, db_index=True, default="", max_length=100, verbose_name="city")),
(
"county",
models.CharField(blank=True, db_index=True, default="", max_length=100, verbose_name="county"),
),
("encrypted_address", models.TextField(blank=True, default="", verbose_name="address")),
("phone", models.CharField(blank=True, default="", max_length=30, verbose_name="telephone")),
("email", models.EmailField(db_index=True, max_length=254, verbose_name="email")),
(
Expand Down Expand Up @@ -67,7 +63,9 @@ class Migration(migrations.Migration):
"pdf_file",
models.FileField(
blank=True,
upload_to=functools.partial(donations.models.main.year_ngo_donor_directory_path, *("documents",), **{}),
upload_to=functools.partial(
donations.models.main.year_ngo_donor_directory_path, *("donation-forms",), **{}
),
verbose_name="PDF file",
),
),
Expand Down Expand Up @@ -172,12 +170,14 @@ class Migration(migrations.Migration):
("is_active", models.BooleanField(db_index=True, default=True, verbose_name="is active")),
("form_url", models.URLField(blank=True, default="", max_length=255, verbose_name="form url")),
(
"custom_form",
"prefilled_form",
models.FileField(
blank=True,
storage=donations.models.main.select_public_storage,
upload_to=functools.partial(donations.models.main.ngo_directory_path, *("forms",), **{}),
verbose_name="form with ngo data",
upload_to=functools.partial(
donations.models.main.year_ngo_directory_path, *("ngo-forms",), **{}
),
verbose_name="form with prefilled ngo data",
),
),
("date_created", models.DateTimeField(auto_now_add=True, db_index=True, verbose_name="date created")),
Expand Down
5 changes: 3 additions & 2 deletions backend/donations/migrations/0002_initial.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Generated by Django 4.2.9 on 2024-01-27 08:54
# Generated by Django 4.2.9 on 2024-02-02 12:06

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


class Migration(migrations.Migration):

initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("donations", "0001_initial"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
Expand Down
24 changes: 0 additions & 24 deletions backend/donations/migrations/0003_alter_donor_pdf_file.py

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions backend/donations/migrations/0005_alter_ngo_prefilled_form.py

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions backend/donations/migrations/0007_donor_address.py

This file was deleted.

This file was deleted.

7 changes: 6 additions & 1 deletion backend/partners/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Generated by Django 4.2.9 on 2024-01-27 08:54
# Generated by Django 4.2.9 on 2024-02-02 12:06

from django.db import migrations, models
import django.db.models.functions.text


class Migration(migrations.Migration):

initial = True

dependencies = [
Expand All @@ -19,6 +20,10 @@ class Migration(migrations.Migration):
("name", models.CharField(blank=True, db_index=True, max_length=100, verbose_name="name")),
("subdomain", models.CharField(max_length=100, unique=True, verbose_name="subdomain")),
("is_active", models.BooleanField(db_index=True, default=True, verbose_name="is active")),
("has_custom_header", models.BooleanField(default=False, verbose_name="has custom header")),
("has_custom_note", models.BooleanField(default=False, verbose_name="has custom note")),
("date_created", models.DateTimeField(auto_now_add=True, verbose_name="date created")),
("date_updated", models.DateTimeField(auto_now=True, verbose_name="date updated")),
("ngos", models.ManyToManyField(blank=True, to="donations.ngo", verbose_name="NGOs")),
],
options={
Expand Down

This file was deleted.

This file was deleted.

5 changes: 3 additions & 2 deletions backend/users/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.9 on 2024-01-27 08:54
# Generated by Django 4.2.9 on 2024-02-02 12:06

from django.db import migrations, models
import django.db.models.deletion
Expand All @@ -8,11 +8,12 @@


class Migration(migrations.Migration):

initial = True

dependencies = [
("auth", "0012_alter_user_first_name_max_length"),
("donations", "0001_initial"),
("auth", "0012_alter_user_first_name_max_length"),
]

operations = [
Expand Down

0 comments on commit 0f1fe16

Please sign in to comment.