From 80835408ba2c701ab5ee46cc311189596f954844 Mon Sep 17 00:00:00 2001
From: sks444 <krishnasingh.ss30@gmail.com>
Date: Mon, 26 Jul 2021 13:53:17 +0530
Subject: [PATCH] Fix migrations

---
 .../projects/migrations/0036_add_vendor.py    | 44 +++++----
 ...me_verbose_name_of_vendor_form_settings.py | 89 -------------------
 ...me_verbose_name_of_vendor_form_settings.py | 19 ----
 ..._vendor_setup_field_to_project_settings.py | 18 ----
 .../0040_add_created_and_updated_at.py        | 25 ------
 ...0041_add_user_has_updated_details_field.py | 18 ----
 6 files changed, 26 insertions(+), 187 deletions(-)
 delete mode 100644 hypha/apply/projects/migrations/0037_rename_verbose_name_of_vendor_form_settings.py
 delete mode 100644 hypha/apply/projects/migrations/0038_rename_verbose_name_of_vendor_form_settings.py
 delete mode 100644 hypha/apply/projects/migrations/0039_add_required_vendor_setup_field_to_project_settings.py
 delete mode 100644 hypha/apply/projects/migrations/0040_add_created_and_updated_at.py
 delete mode 100644 hypha/apply/projects/migrations/0041_add_user_has_updated_details_field.py

diff --git a/hypha/apply/projects/migrations/0036_add_vendor.py b/hypha/apply/projects/migrations/0036_add_vendor.py
index 162e2249a..32701a1aa 100644
--- a/hypha/apply/projects/migrations/0036_add_vendor.py
+++ b/hypha/apply/projects/migrations/0036_add_vendor.py
@@ -1,4 +1,4 @@
-# Generated by Django 2.2.24 on 2021-06-14 11:33
+# Generated by Django 2.2.24 on 2021-07-26 08:22
 
 from django.conf import settings
 import django.core.files.storage
@@ -10,8 +10,8 @@ import wagtail.core.fields
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('wagtailcore', '0062_comment_models_and_pagesubscription'),
         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+        ('wagtailcore', '0062_comment_models_and_pagesubscription'),
         ('application_projects', '0035_add_heading_block_to_form_fields_block'),
     ]
 
@@ -47,6 +47,11 @@ class Migration(migrations.Migration):
             model_name='project',
             name='contact_phone',
         ),
+        migrations.AddField(
+            model_name='projectsettings',
+            name='vendor_setup_required',
+            field=models.BooleanField(default=True),
+        ),
         migrations.CreateModel(
             name='VendorFormSettings',
             fields=[
@@ -56,37 +61,37 @@ class Migration(migrations.Migration):
                 ('contractor_name_label', models.TextField(default="2. What is the individual's name who is signing the contract?", verbose_name='label')),
                 ('contractor_name_help_text', wagtail.core.fields.RichTextField(blank=True, default='This person is is authorised to sign contract on behalf of the person or organization named above.', verbose_name='help text')),
                 ('type_label', models.TextField(default='3. Is the bank account owned by the person or organisation in the Question 1 above?', verbose_name='label')),
-                ('type_help_text', wagtail.core.fields.RichTextField(blank=True, default='The name of the bank account must be the same as on the contract.', verbose_name='help_text')),
+                ('type_help_text', wagtail.core.fields.RichTextField(blank=True, default='The name of the bank account must be the same as on the contract.', verbose_name='help text')),
                 ('required_to_pay_taxes_label', models.TextField(default='Is the organisation required to pay US taxes?', verbose_name='label')),
-                ('required_to_pay_taxes_help_text', wagtail.core.fields.RichTextField(blank=True, default='', verbose_name='help_text')),
+                ('required_to_pay_taxes_help_text', wagtail.core.fields.RichTextField(blank=True, default='', verbose_name='help text')),
                 ('due_diligence_documents_label', models.TextField(default='Due Diligence Documents', verbose_name='label')),
-                ('due_diligence_documents_help_text', wagtail.core.fields.RichTextField(blank=True, default='Upload Due Diligence Documents. E.g. w8/w9 forms.', verbose_name='help_text')),
+                ('due_diligence_documents_help_text', wagtail.core.fields.RichTextField(blank=True, default='Upload Due Diligence Documents. E.g. w8/w9 forms.', verbose_name='help text')),
                 ('account_holder_name_label', models.TextField(default='Bank Account Holder name', verbose_name='label')),
-                ('account_holder_name_help_text', wagtail.core.fields.RichTextField(blank=True, default='This name must be same as the person or organisation that signed the contract. This person is authorised to sign contracts on behalf of the person or organisation named above.', verbose_name='help_text')),
+                ('account_holder_name_help_text', wagtail.core.fields.RichTextField(blank=True, default='This name must be same as the person or organisation that signed the contract. This person is authorised to sign contracts on behalf of the person or organisation named above.', verbose_name='help text')),
                 ('account_routing_number_label', models.TextField(default='Bank Account Routing number', verbose_name='label')),
-                ('account_routing_number_help_text', wagtail.core.fields.RichTextField(blank=True, default='Depending on your country, this might be called the ACH, SWIFT, BIC or ABA number.', verbose_name='help_text')),
+                ('account_routing_number_help_text', wagtail.core.fields.RichTextField(blank=True, default='Depending on your country, this might be called the ACH, SWIFT, BIC or ABA number.', verbose_name='help text')),
                 ('account_number_label', models.TextField(default='Bank Account Number', verbose_name='label')),
-                ('account_number_help_text', wagtail.core.fields.RichTextField(blank=True, default='Depending on your country, this might be called the account number, IBAN, or BBAN number.', verbose_name='help_text')),
+                ('account_number_help_text', wagtail.core.fields.RichTextField(blank=True, default='Depending on your country, this might be called the account number, IBAN, or BBAN number.', verbose_name='help text')),
                 ('account_currency_label', models.TextField(default='Bank Account Currency', verbose_name='label')),
-                ('account_currency_help_text', wagtail.core.fields.RichTextField(blank=True, default='This is the currency of this bank account.', verbose_name='label')),
+                ('account_currency_help_text', wagtail.core.fields.RichTextField(blank=True, default='This is the currency of this bank account.', verbose_name='help text')),
                 ('need_extra_info_label', models.TextField(default='Do you need to provide us with extra information?', verbose_name='label')),
-                ('need_extra_info_help_text', wagtail.core.fields.RichTextField(blank=True, default='', verbose_name='help_text')),
+                ('need_extra_info_help_text', wagtail.core.fields.RichTextField(blank=True, default='', verbose_name='help text')),
                 ('branch_address_label', models.TextField(default='Bank Account Branch Address', verbose_name='label')),
-                ('branch_address_help_text', models.TextField(blank=True, default='The address of the bank branch where you have the bank account located(not the bank account holder address)', verbose_name='help_text')),
+                ('branch_address_help_text', models.TextField(blank=True, default='The address of the bank branch where you have the bank account located(not the bank account holder address)', verbose_name='help text')),
                 ('ib_account_routing_number_label', models.TextField(default='Intermediary Bank Account Routing Number', verbose_name='label')),
-                ('ib_account_routing_number_help_text', wagtail.core.fields.RichTextField(blank=True, default='Depending on your country, this might be called ACH, SWIFT, BIC or ABA number', verbose_name='help_text')),
+                ('ib_account_routing_number_help_text', wagtail.core.fields.RichTextField(blank=True, default='Depending on your country, this might be called ACH, SWIFT, BIC or ABA number', verbose_name='help text')),
                 ('ib_account_number_label', models.TextField(default='Intermediary Bank Account Number', verbose_name='label')),
-                ('ib_account_number_help_text', wagtail.core.fields.RichTextField(blank=True, default='Depending on your country, this might be called the account number, IBAN, or BBAN number', verbose_name='help_text')),
+                ('ib_account_number_help_text', wagtail.core.fields.RichTextField(blank=True, default='Depending on your country, this might be called the account number, IBAN, or BBAN number', verbose_name='help text')),
                 ('ib_account_currency_label', models.TextField(default='Intermediary Bank Account Currency', verbose_name='label')),
-                ('ib_account_currency_help_text', wagtail.core.fields.RichTextField(blank=True, default='This is the currency of this bank account', verbose_name='help_text')),
+                ('ib_account_currency_help_text', wagtail.core.fields.RichTextField(blank=True, default='This is the currency of this bank account', verbose_name='help text')),
                 ('ib_branch_address_label', models.TextField(default='Intermediary Bank Branch Address', verbose_name='label')),
-                ('ib_branch_address_help_text', wagtail.core.fields.RichTextField(blank=True, default='Bank branch address(not the bank account holder address)', verbose_name='help_text')),
+                ('ib_branch_address_help_text', wagtail.core.fields.RichTextField(blank=True, default='Bank branch address(not the bank account holder address)', verbose_name='help text')),
                 ('nid_type_label', models.TextField(default='Account Holder National Identity Document Type', verbose_name='label')),
-                ('nid_type_help_text', wagtail.core.fields.RichTextField(blank=True, default='This could be a passport, a National Identity number, or other national identity document.', verbose_name='help_text')),
+                ('nid_type_help_text', wagtail.core.fields.RichTextField(blank=True, default='This could be a passport, a National Identity number, or other national identity document.', verbose_name='help text')),
                 ('nid_number_label', models.TextField(default='Account Holder National Identity Document Number', verbose_name='label')),
-                ('nid_number_help_text', wagtail.core.fields.RichTextField(blank=True, default='', verbose_name='help_text')),
+                ('nid_number_help_text', wagtail.core.fields.RichTextField(blank=True, default='', verbose_name='help text')),
                 ('other_info_label', models.TextField(default='Other Information', verbose_name='label')),
-                ('other_info_help_text', wagtail.core.fields.RichTextField(blank=True, default='If you need to include other information not listed above, provide it here.', verbose_name='help_text')),
+                ('other_info_help_text', wagtail.core.fields.RichTextField(blank=True, default='If you need to include other information not listed above, provide it here.', verbose_name='help text')),
                 ('site', models.OneToOneField(editable=False, on_delete=django.db.models.deletion.CASCADE, to='wagtailcore.Site')),
             ],
             options={
@@ -97,12 +102,15 @@ class Migration(migrations.Migration):
             name='Vendor',
             fields=[
                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Creation time')),
+                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Update time')),
                 ('name', models.CharField(blank=True, max_length=150)),
                 ('contractor_name', models.CharField(blank=True, max_length=150)),
                 ('address', models.TextField(blank=True, verbose_name='Address')),
                 ('type', models.CharField(blank=True, choices=[('organization', 'Yes, the account belongs to the organisation above'), ('personal', 'No, it is a personal bank account')], max_length=15)),
                 ('required_to_pay_taxes', models.BooleanField(default=False)),
                 ('other_info', models.TextField(blank=True)),
+                ('user_has_updated_details', models.BooleanField(default=False)),
                 ('bank_info', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='application_projects.BankInformation')),
                 ('user', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='vendor', to=settings.AUTH_USER_MODEL)),
             ],
diff --git a/hypha/apply/projects/migrations/0037_rename_verbose_name_of_vendor_form_settings.py b/hypha/apply/projects/migrations/0037_rename_verbose_name_of_vendor_form_settings.py
deleted file mode 100644
index 7f83e85f5..000000000
--- a/hypha/apply/projects/migrations/0037_rename_verbose_name_of_vendor_form_settings.py
+++ /dev/null
@@ -1,89 +0,0 @@
-# Generated by Django 2.2.24 on 2021-06-18 04:54
-
-from django.db import migrations, models
-import wagtail.core.fields
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-        ('application_projects', '0036_add_vendor'),
-    ]
-
-    operations = [
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='account_holder_name_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='This name must be same as the person or organisation that signed the contract. This person is authorised to sign contracts on behalf of the person or organisation named above.', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='account_number_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='Depending on your country, this might be called the account number, IBAN, or BBAN number.', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='account_routing_number_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='Depending on your country, this might be called the ACH, SWIFT, BIC or ABA number.', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='branch_address_help_text',
-            field=models.TextField(blank=True, default='The address of the bank branch where you have the bank account located(not the bank account holder address)', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='due_diligence_documents_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='Upload Due Diligence Documents. E.g. w8/w9 forms.', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='ib_account_currency_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='This is the currency of this bank account', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='ib_account_number_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='Depending on your country, this might be called the account number, IBAN, or BBAN number', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='ib_account_routing_number_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='Depending on your country, this might be called ACH, SWIFT, BIC or ABA number', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='ib_branch_address_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='Bank branch address(not the bank account holder address)', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='need_extra_info_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='nid_number_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='nid_type_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='This could be a passport, a National Identity number, or other national identity document.', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='other_info_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='If you need to include other information not listed above, provide it here.', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='required_to_pay_taxes_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='', verbose_name='help text'),
-        ),
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='type_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='The name of the bank account must be the same as on the contract.', verbose_name='help text'),
-        ),
-    ]
diff --git a/hypha/apply/projects/migrations/0038_rename_verbose_name_of_vendor_form_settings.py b/hypha/apply/projects/migrations/0038_rename_verbose_name_of_vendor_form_settings.py
deleted file mode 100644
index 8d7eaa03f..000000000
--- a/hypha/apply/projects/migrations/0038_rename_verbose_name_of_vendor_form_settings.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Generated by Django 2.2.24 on 2021-06-18 06:27
-
-from django.db import migrations
-import wagtail.core.fields
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-        ('application_projects', '0037_rename_verbose_name_of_vendor_form_settings'),
-    ]
-
-    operations = [
-        migrations.AlterField(
-            model_name='vendorformsettings',
-            name='account_currency_help_text',
-            field=wagtail.core.fields.RichTextField(blank=True, default='This is the currency of this bank account.', verbose_name='help text'),
-        ),
-    ]
diff --git a/hypha/apply/projects/migrations/0039_add_required_vendor_setup_field_to_project_settings.py b/hypha/apply/projects/migrations/0039_add_required_vendor_setup_field_to_project_settings.py
deleted file mode 100644
index dadb12e37..000000000
--- a/hypha/apply/projects/migrations/0039_add_required_vendor_setup_field_to_project_settings.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 2.2.24 on 2021-06-22 10:43
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-        ('application_projects', '0038_rename_verbose_name_of_vendor_form_settings'),
-    ]
-
-    operations = [
-        migrations.AddField(
-            model_name='projectsettings',
-            name='vendor_setup_required',
-            field=models.BooleanField(default=True),
-        ),
-    ]
diff --git a/hypha/apply/projects/migrations/0040_add_created_and_updated_at.py b/hypha/apply/projects/migrations/0040_add_created_and_updated_at.py
deleted file mode 100644
index 557cb6f60..000000000
--- a/hypha/apply/projects/migrations/0040_add_created_and_updated_at.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# Generated by Django 2.2.24 on 2021-06-30 04:18
-
-from django.db import migrations, models
-import django.utils.timezone
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-        ('application_projects', '0039_add_required_vendor_setup_field_to_project_settings'),
-    ]
-
-    operations = [
-        migrations.AddField(
-            model_name='vendor',
-            name='created_at',
-            field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now, verbose_name='Creation time'),
-            preserve_default=False,
-        ),
-        migrations.AddField(
-            model_name='vendor',
-            name='updated_at',
-            field=models.DateTimeField(auto_now=True, verbose_name='Update time'),
-        ),
-    ]
diff --git a/hypha/apply/projects/migrations/0041_add_user_has_updated_details_field.py b/hypha/apply/projects/migrations/0041_add_user_has_updated_details_field.py
deleted file mode 100644
index 507a6118a..000000000
--- a/hypha/apply/projects/migrations/0041_add_user_has_updated_details_field.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 2.2.24 on 2021-07-05 10:26
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-        ('application_projects', '0040_add_created_and_updated_at'),
-    ]
-
-    operations = [
-        migrations.AddField(
-            model_name='vendor',
-            name='user_has_updated_details',
-            field=models.BooleanField(default=False),
-        ),
-    ]
-- 
GitLab