-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update migrations of connector-lead , lead, entry
- Loading branch information
Showing
14 changed files
with
140 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 3.2.25 on 2024-06-21 11:49 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('lead', '0049_auto_20231121_0926_squashed_0054_auto_20231218_0552'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameModel( | ||
old_name='LeadPreviewImage', | ||
new_name='LeadPreviewAttachment' | ||
), | ||
] |
18 changes: 0 additions & 18 deletions
18
apps/lead/migrations/0051_alter_leadpreviewattachment_type.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Generated by Django 3.2.25 on 2024-06-25 05:09 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
def set_file_preview(apps, schema_editor): | ||
LeadPreviewAttachment = apps.get_model('lead', 'LeadPreviewAttachment') | ||
lead_attachments = LeadPreviewAttachment.objects.all() | ||
for lead_attachment in lead_attachments: | ||
lead_attachment.file_preview = lead_attachment.file | ||
lead_attachment.type = 2 # default type is image | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('lead', '0050_auto_20240621_1149'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='leadpreviewattachment', | ||
name='order', | ||
field=models.IntegerField(default=0) | ||
), | ||
migrations.AddField( | ||
model_name='leadpreviewattachment', | ||
name='page_number', | ||
field=models.IntegerField(default=0), | ||
), | ||
migrations.AddField( | ||
model_name='leadpreviewattachment', | ||
name='file_preview', | ||
field=models.FileField(upload_to='lead-preview/attachments-preview/') | ||
), | ||
migrations.AddField( | ||
model_name='leadpreviewattachment', | ||
name='type', | ||
field=models.PositiveSmallIntegerField(choices=[(1, 'XLSX'), (2, 'Image')],max_length=20) | ||
), | ||
migrations.RunPython( | ||
set_file_preview, | ||
reverse_code=migrations.RunPython.noop, | ||
) | ||
] |
18 changes: 0 additions & 18 deletions
18
apps/lead/migrations/0052_alter_leadpreviewattachment_type.py
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
apps/lead/migrations/0053_alter_leadpreviewattachment_type.py
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
apps/unified_connector/migrations/0009_auto_20240618_0924.py
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
apps/unified_connector/migrations/0009_auto_20240621_1149.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.2.25 on 2024-06-21 11:49 | ||
|
||
from django.db import migrations,models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('unified_connector', '0008_connectorlead_text_extraction_id'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='connectorleadpreviewimage', | ||
old_name='image', | ||
new_name='file', | ||
), | ||
migrations.AlterField( | ||
model_name='connectorleadpreviewimage', | ||
name='file', | ||
field=models.FileField(upload_to='connector-lead/attachments/') | ||
), | ||
migrations.RenameModel( | ||
old_name='ConnectorLeadPreviewImage', | ||
new_name='ConnectorLeadPreviewAttachment' | ||
), | ||
] |
44 changes: 44 additions & 0 deletions
44
apps/unified_connector/migrations/0010_auto_20240625_0806.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Generated by Django 3.2.25 on 2024-06-25 08:06 | ||
|
||
from django.db import migrations, models | ||
|
||
def set_file_preview(apps, schema_editor): | ||
ConnectorLeadPreviewAttachment = apps.get_model('unified_connector', 'ConnectorLeadPreviewAttachment') | ||
connector_lead_attachments = ConnectorLeadPreviewAttachment.objects.all() | ||
for connector_lead_attachment in connector_lead_attachments: | ||
connector_lead_attachment.file_preview = connector_lead_attachment.file | ||
connector_lead_attachment.type = 2 # default type is image | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('unified_connector', '0009_auto_20240621_1149'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='connectorleadpreviewattachment', | ||
name='order', | ||
field=models.IntegerField(default=0) | ||
), | ||
migrations.AddField( | ||
model_name='connectorleadpreviewattachment', | ||
name='page_number', | ||
field=models.IntegerField(default=0), | ||
), | ||
migrations.AddField( | ||
model_name='connectorleadpreviewattachment', | ||
name='file_preview', | ||
field=models.FileField(upload_to='connector-lead/attachments-preview/') | ||
), | ||
migrations.AddField( | ||
model_name='connectorleadpreviewattachment', | ||
name='type', | ||
field=models.PositiveSmallIntegerField(choices=[(1, 'XLSX'), (2, 'Image')]) | ||
), | ||
migrations.RunPython( | ||
set_file_preview, | ||
reverse_code=migrations.RunPython.noop, | ||
) | ||
] |
Empty file.