Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in Model Name Migration from CRATER #107

Closed
jmsx opened this issue Jun 14, 2024 · 2 comments · Fixed by #108
Closed

Errors in Model Name Migration from CRATER #107

jmsx opened this issue Jun 14, 2024 · 2 comments · Fixed by #108
Assignees
Milestone

Comments

@jmsx
Copy link

jmsx commented Jun 14, 2024

Description

We have identified a problem during the migration from CRATER where model names in some tables, such as emaillogs, are not updated correctly. Specifically, the mailable_type column retains the string crater, causing data errors. This same issue is found in custom fields (custom_fields).

Steps to Reproduce

  1. Migrate data from CRATER to the new database.
  2. Check the emaillogs table and observe that the mailable_type column contains the value crater instead of the correct model name.
  3. Check the custom fields (custom_fields) and verify that the model names also contain incorrect values.

Expected Behavior

The values in the mailable_type column and in the custom fields should be correctly updated during migration to reflect the appropriate model names in the new system.

Actual Behavior

The values in the mailable_type column of the emaillogs table and in the custom fields (custom_fields) retain the string crater, causing inconsistencies and data errors.

Impact

This issue can cause errors in applications that rely on this data, as the incorrect names can lead to failures in application logic and data integrity.

Possible Solution

Implement a migration script that correctly updates the values of the affected columns:

  • Update the values in the mailable_type column in the emaillogs table.
  • Correct the model names in the custom fields (custom_fields).

Additional Notes

  • This issue was detected during migration testing.
  • It is recommended to perform post-migration validation to ensure data integrity.
@mchev mchev added this to the 2.0.0 milestone Jun 14, 2024
mchev added a commit to mchev/InvoiceShelf that referenced this issue Jun 16, 2024
@mchev mchev linked a pull request Jun 16, 2024 that will close this issue
@mchev mchev self-assigned this Jun 16, 2024
@mchev mchev added the in progress Issues that are already being worked label Jun 16, 2024
mchev added a commit that referenced this issue Jun 20, 2024
@gdarko
Copy link

gdarko commented Jun 25, 2024

This can be closed now :-)

@gdarko gdarko closed this as completed Jun 25, 2024
@gdarko gdarko removed the in progress Issues that are already being worked label Jun 25, 2024
@jmsx
Copy link
Author

jmsx commented Jun 29, 2024

Great job! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants