Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@stnguyen90
Copy link
Contributor

@stnguyen90 stnguyen90 commented Oct 24, 2025

What does this PR do?

The legacy DB type used databases for the key. Since we have our new tables DB API, the key is now tablesDB.

Fixes appwrite/sdk-for-cli#209

Test Plan

None

Related PRs and Issues

None

Have you read the Contributing Guidelines on issues?

Yes

Summary by CodeRabbit

  • Documentation
    • Configuration examples and reference documentation have been updated to reflect new naming standards for table configuration. This ensures developers have access to current and accurate examples that align with the latest schema standards, making it easier to implement correct configurations without confusion or compatibility issues.

The legacy DB type used databases for the key. Since we have our new tables DB API, the key is now tablesDB.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 24, 2025

Walkthrough

A documentation file in the command-line tables section was updated to rename a configuration key. In the appwrite.config.json example, the "databases" key was changed to "tablesDB" while maintaining the existing table entry structure. This reflects an updated schema for how tables are organized in the configuration file.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

This change affects a single documentation file with a straightforward key rename in a configuration example. The modification is cosmetic and non-functional from a code perspective, requiring minimal review to verify the schema change is intentional and accurately documented.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
βœ… Passed checks (4 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check βœ… Passed The pull request title "fix: update databases key to tablesDB" directly and clearly describes the main change in the PR: renaming the configuration key from "databases" to "tablesDB" in the appwrite.config.json documentation example. The title is concise, specific, and uses clear language that allows a teammate scanning the history to immediately understand the primary change without ambiguity.
Linked Issues Check βœ… Passed The PR addresses the linked issue appwrite/sdk-for-cli#209 by updating the appwrite.config.json documentation example to use the correct "tablesDB" key instead of "databases". The issue reported that users following the documentation example encountered a "Database not found" error when attempting to push tables via the CLI. Since the new Tables DB API expects the "tablesDB" key (not the legacy "databases" key), correcting the documentation example directly helps users follow the proper configuration format and should resolve the error described in the issue.
Out of Scope Changes Check βœ… Passed The changes are limited to updating a single configuration key in the documentation file (src/routes/docs/tooling/command-line/tables/+page.markdoc), with no structural changes or modifications to other files. The summary indicates only the "databases" key was renamed to "tablesDB" while the table entry structure remained the same, and no public-entity signature changes were detected. This change is directly scoped to fixing the documentation example as described in the linked issue.
✨ Finishing touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-cli-databases-key

πŸ“œ Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between b443430 and 62a5f8e.

πŸ“’ Files selected for processing (1)
  • src/routes/docs/tooling/command-line/tables/+page.markdoc (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
πŸ““ Common learnings
Learnt from: ebenezerdon
PR: appwrite/website#2372
File: src/routes/docs/tutorials/react/step-6/+page.markdoc:70-75
Timestamp: 2025-09-05T19:35:53.943Z
Learning: In React tutorial files, the correct Appwrite database instance to import is `tablesDB` from "../appwrite", not `databases`. The import statement should be `import { tablesDB } from "../appwrite"` to match the usage throughout the React tutorial code.
Learnt from: ebenezerdon
PR: appwrite/website#2372
File: src/routes/docs/tutorials/nuxt/step-6/+page.markdoc:79-83
Timestamp: 2025-09-05T19:35:04.162Z
Learning: In Nuxt tutorial files, the correct Appwrite database instance to use is `tablesDB` (imported from "~/appwrite"), not `database`. All tablesDB method calls should use the object parameter format: listRows({ databaseId, tableId, queries }), createRow({ databaseId, tableId, rowId, data }), and deleteRow({ databaseId, tableId, rowId }).
Learnt from: ebenezerdon
PR: appwrite/website#2372
File: src/routes/docs/tutorials/react-native/step-6/+page.markdoc:67-73
Timestamp: 2025-09-05T19:35:59.449Z
Learning: In React Native tutorials, the lib/appwrite.js file exports `tablesDB` (not `databases`), so imports should use `import { tablesDB } from "../lib/appwrite"` to match the export pattern established in step-3.
Learnt from: ebenezerdon
PR: appwrite/website#2372
File: src/routes/docs/tutorials/react-native/step-6/+page.markdoc:67-73
Timestamp: 2025-09-05T19:35:59.449Z
Learning: In React Native tutorials, the lib/appwrite.js file exports `tablesDB` (not `databases`), so imports should use `import { tablesDB } from "../lib/appwrite"` to match the export pattern established in step-3.
πŸ“š Learning: 2025-09-05T19:35:59.449Z
Learnt from: ebenezerdon
PR: appwrite/website#2372
File: src/routes/docs/tutorials/react-native/step-6/+page.markdoc:67-73
Timestamp: 2025-09-05T19:35:59.449Z
Learning: In React Native tutorials, the lib/appwrite.js file exports `tablesDB` (not `databases`), so imports should use `import { tablesDB } from "../lib/appwrite"` to match the export pattern established in step-3.

Applied to files:

  • src/routes/docs/tooling/command-line/tables/+page.markdoc
πŸ“š Learning: 2025-09-05T19:35:53.943Z
Learnt from: ebenezerdon
PR: appwrite/website#2372
File: src/routes/docs/tutorials/react/step-6/+page.markdoc:70-75
Timestamp: 2025-09-05T19:35:53.943Z
Learning: In React tutorial files, the correct Appwrite database instance to import is `tablesDB` from "../appwrite", not `databases`. The import statement should be `import { tablesDB } from "../appwrite"` to match the usage throughout the React tutorial code.

Applied to files:

  • src/routes/docs/tooling/command-line/tables/+page.markdoc
πŸ“š Learning: 2025-09-05T19:35:04.162Z
Learnt from: ebenezerdon
PR: appwrite/website#2372
File: src/routes/docs/tutorials/nuxt/step-6/+page.markdoc:79-83
Timestamp: 2025-09-05T19:35:04.162Z
Learning: In Nuxt tutorial files, the correct Appwrite database instance to use is `tablesDB` (imported from "~/appwrite"), not `database`. All tablesDB method calls should use the object parameter format: listRows({ databaseId, tableId, queries }), createRow({ databaseId, tableId, rowId, data }), and deleteRow({ databaseId, tableId, rowId }).

Applied to files:

  • src/routes/docs/tooling/command-line/tables/+page.markdoc
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: tests
πŸ”‡ Additional comments (1)
src/routes/docs/tooling/command-line/tables/+page.markdoc (1)

35-35: LGTM! Correct key update from legacy to new API.

This change correctly updates the configuration key from "databases" to "tablesDB" in the appwrite.config.json example, which aligns with the new Tables DB API and fixes the CLI "Database not found" error described in issue appwrite/sdk-for-cli#209. Verification confirms this change is isolated and no other legacy "databases" config keys remain in CLI documentation.


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.

@ChiragAgg5k ChiragAgg5k merged commit 2235c22 into main Oct 24, 2025
4 checks passed
@ChiragAgg5k ChiragAgg5k deleted the fix-cli-databases-key branch October 24, 2025 03:52
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.

CLI - Error when trying to create DB's via appwrite.config.json

3 participants