Skip to content

Comments

Refactor Appwrite migration to remove unused getDatabaseDSN callable …#151

Merged
abnegate merged 1 commit intomultitype-dbfrom
remove-dsn-callables
Feb 25, 2026
Merged

Refactor Appwrite migration to remove unused getDatabaseDSN callable …#151
abnegate merged 1 commit intomultitype-dbfrom
remove-dsn-callables

Conversation

@ArnabChatterjee20k
Copy link
Contributor

@ArnabChatterjee20k ArnabChatterjee20k commented Feb 24, 2026

…and update database handling in resource classes. Adjusted type assignments in DocumentsDB and VectorDB to use specific resource types.

Summary by CodeRabbit

  • Refactor
    • Simplified database connection handling in migration processes by removing custom DSN factory pattern.
    • Standardized database type values to use centralized constants instead of string literals.
    • Made database field mandatory in database resource definitions for improved data integrity.
    • Enhanced database serialization to include all relevant database information in exports.

…and update database handling in resource classes. Adjusted type assignments in DocumentsDB and VectorDB to use specific resource types.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 280fe7a and 682cdc3.

📒 Files selected for processing (4)
  • src/Migration/Destinations/Appwrite.php
  • src/Migration/Resources/Database/Database.php
  • src/Migration/Resources/Database/DocumentsDB.php
  • src/Migration/Resources/Database/VectorDB.php

Walkthrough

The changes refactor database handling across the migration module. The Appwrite destination class is simplified by removing a DSN factory callable and directly using resource database values. In parallel, Database and its subclasses (DocumentsDB and VectorDB) are updated to include the 'database' field in serialization output, make database a required field in fromArray deserialization, and replace hardcoded 'legacy' type defaults with centralized type constants.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the unused getDatabaseDSN callable from Appwrite migration, which aligns with the primary refactor across all modified files.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-dsn-callables

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ArnabChatterjee20k
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 24, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@abnegate abnegate merged commit 237513f into multitype-db Feb 25, 2026
4 checks passed
@abnegate abnegate deleted the remove-dsn-callables branch February 25, 2026 03:19
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