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

Add logs and fix timestamps in migrate domain command #6468

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

ijreilly
Copy link
Collaborator

No description provided.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Enhanced error logging and timestamp handling in the 0-23-migrate-domain-to-links.command.ts file to improve migration accuracy and debugging.

  • File: packages/twenty-server/src/database/commands/upgrade-version/0-23/0-23-migrate-domain-to-links.command.ts
    • Timestamps Exclusion: Removed createdAt and updatedAt from domainNameField during migration.
    • Error Logging: Enhanced to include detailed error messages on migration failure.
    • Potential Pitfalls: Risk of missing critical timestamps in future migrations and incomplete error handling scenarios.

1 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings

Comment on lines +135 to +137
createdAt: _createdAt,
updatedAt: _updatedAt,
...domainNameFieldWithoutIdAndTimestamps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Ensure that excluding timestamps does not affect other parts of the migration process.

@@ -207,6 +212,7 @@ export class MigrateDomainNameFromTextToLinksCommand extends CommandRunner {

this.logger.log(`Migration of domainName done!`);
} catch (error) {
this.logger.log(`Error: ${error.message}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider adding more detailed error handling to cover different types of errors.

@charlesBochet charlesBochet merged commit 7fe00b1 into main Jul 31, 2024
6 checks passed
@charlesBochet charlesBochet deleted the add-logs-script branch July 31, 2024 09:23
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 this pull request may close these issues.

2 participants