Skip to content

Commit

Permalink
BankAccountInfo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pkujawa committed Nov 5, 2024
1 parent 1721fbf commit eface1d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 3 deletions.
52 changes: 52 additions & 0 deletions src/hct_mis_api/apps/household/migrations/0188_migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Generated by Django 3.2.25 on 2024-11-05 17:49
from django.contrib.postgres.operations import AddIndexConcurrently
from django.db import migrations, models


class Migration(migrations.Migration):
atomic = False

dependencies = [
('household', '0187_migration'),
]

operations = [
migrations.RemoveField(
model_name='bankaccountinfo',
name='is_migration_handled',
),
migrations.SeparateDatabaseAndState(
state_operations=[
migrations.AlterField(
model_name='bankaccountinfo',
name='bank_account_number',
field=models.CharField(db_index=True, max_length=64),
),
],
database_operations=[
AddIndexConcurrently(
model_name="bankaccountinfo",
index=models.Index(
fields=["bank_account_number"], name="bank_account_number_idx"
)
),
]
),
migrations.SeparateDatabaseAndState(
state_operations=[
migrations.AlterField(
model_name='bankaccountinfo',
name='debit_card_number',
field=models.CharField(blank=True, db_index=True, default='', max_length=255),
),
],
database_operations=[
AddIndexConcurrently(
model_name="bankaccountinfo",
index=models.Index(
fields=["debit_card_number"], name="debit_card_number_idx"
)
),
]
)
]
5 changes: 2 additions & 3 deletions src/hct_mis_api/apps/household/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1316,11 +1316,10 @@ class BankAccountInfo(SoftDeletableRepresentationMergeStatusModelWithDate, TimeS
on_delete=models.CASCADE,
)
bank_name = models.CharField(max_length=255)
bank_account_number = models.CharField(max_length=64)
debit_card_number = models.CharField(max_length=255, blank=True, default="")
bank_account_number = models.CharField(max_length=64, db_index=True)
debit_card_number = models.CharField(max_length=255, blank=True, default="", db_index=True)
bank_branch_name = models.CharField(max_length=255, blank=True, default="")
account_holder_name = models.CharField(max_length=255, blank=True, default="")
is_migration_handled = models.BooleanField(default=False)
copied_from = models.ForeignKey(
"self",
null=True,
Expand Down

0 comments on commit eface1d

Please sign in to comment.