diff --git a/payment/migrations/0004_update_django_scheme_with_missing_fields.py b/payment/migrations/0004_update_django_scheme_with_missing_fields.py new file mode 100644 index 0000000..30ec539 --- /dev/null +++ b/payment/migrations/0004_update_django_scheme_with_missing_fields.py @@ -0,0 +1,55 @@ +# Generated by Django 3.2.18 on 2023-05-16 13:13 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('contribution', '0003_alter_premium_options'), + ('payment', '0003_auto_20220401_1149'), + ] + + operations = [ + migrations.RenameField( + model_name='payment', + old_name='SpReconcReqId', + new_name='reconc_req_id', + ), + migrations.RenameField( + model_name='payment', + old_name='ReconciliationDate', + new_name='reconciliation_date', + ), + migrations.AddField( + model_name='paymentdetail', + name='payment', + field=models.ForeignKey(db_column='PaymentID', on_delete=django.db.models.deletion.DO_NOTHING, related_name='payment_details', to='payment.payment'), + ), + migrations.AddField( + model_name='paymentdetail', + name='premium', + field=models.ForeignKey(blank=True, db_column='PremiumID', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='payment_details', to='contribution.premium'), + ), + migrations.AlterField( + model_name='payment', + name='reconc_req_id', + field=models.CharField(blank=True, db_column='SpReconcReqId', max_length=30, null=True), + ), + migrations.AlterField( + model_name='payment', + name='reconciliation_date', + field=models.DateTimeField(blank=True, db_column='ReconciliationDate', null=True), + ), + migrations.AlterField( + model_name='payment', + name='status', + field=models.IntegerField(blank=True, db_column='PaymentStatus', null=True), + ), + migrations.AlterField( + model_name='payment', + name='type_of_payment', + field=models.CharField(blank=True, db_column='TypeOfPayment', max_length=50, null=True), + ), + ] diff --git a/payment/migrations/0005_set_managed_to_true.py b/payment/migrations/0005_set_managed_to_true.py new file mode 100644 index 0000000..a78cc13 --- /dev/null +++ b/payment/migrations/0005_set_managed_to_true.py @@ -0,0 +1,21 @@ +# Generated by Django 3.2.18 on 2023-05-16 13:12 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('payment', '0004_update_django_scheme_with_missing_fields'), + ] + + operations = [ + migrations.AlterModelOptions( + name='payment', + options={'managed': True}, + ), + migrations.AlterModelOptions( + name='paymentdetail', + options={'managed': True}, + ), + ] diff --git a/payment/models.py b/payment/models.py index f590451..1b87c86 100644 --- a/payment/models.py +++ b/payment/models.py @@ -76,7 +76,7 @@ class Payment(core_models.VersionedModel): # auditeduser_id = models.IntegerField(db_column='AuditedUSerID', blank=True, null=True) class Meta: - managed = False + managed = True db_table = 'tblPayment' def __str__(self): @@ -117,7 +117,7 @@ class PaymentDetail(core_models.VersionedModel): db_column='AuditedUserId', blank=True, null=True) class Meta: - managed = False + managed = True db_table = 'tblPaymentDetails' def __str__(self):