Skip to content

Fix enabled flag for database and table migration#156

Merged
abnegate merged 1 commit intomainfrom
fix-database-migration
Mar 11, 2026
Merged

Fix enabled flag for database and table migration#156
abnegate merged 1 commit intomainfrom
fix-database-migration

Conversation

@premtsd-code
Copy link
Contributor

@premtsd-code premtsd-code commented Mar 10, 2026

Summary

  • Pass enabled flag from source API response when exporting databases and tables
  • Without this fix, the enabled flag was not included in the data array passed to Database::fromArray() / Table::fromArray(), causing all migrated databases and tables to default to enabled: true regardless of their source state
  • Uses ?? true fallback for backward compatibility with Appwrite instances < 1.4.0, where the enabled field did not exist on databases/collections (added in Appwrite 1.4.0)

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 10, 2026

Walkthrough

This change adds support for the enabled field during data export operations. Two export methods in the Appwrite migration source are modified to include the enabled flag in constructed resources, with a default value of true when the field is not present in the source data.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding the enabled flag handling for database and table migration, which aligns with the primary objective of the PR.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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 fix-database-migration

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.

@abnegate abnegate merged commit bbdd8ef into main Mar 11, 2026
4 checks passed
@abnegate abnegate deleted the fix-database-migration branch March 11, 2026 01:03
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