Skip to content

Conversation

ChiragAgg5k
Copy link
Member

@ChiragAgg5k ChiragAgg5k commented Sep 30, 2025

… cli

What does this PR do?

Test Plan

Related PRs and Issues

Have you read the Contributing Guidelines on issues?

yes.

Summary by CodeRabbit

  • Refactor

    • Updated table index configuration schema to use "columns" instead of "attributes".
    • Whitelist for index definitions now validates keys: key, type, status, columns, orders.
  • Chores

    • Standardized index configuration naming for consistency across the CLI.

User impact: When defining table indexes in configuration, replace "attributes" with "columns" and include optional "orders" as needed.

Copy link
Contributor

coderabbitai bot commented Sep 30, 2025

Walkthrough

The PR updates templates/cli/lib/config.js.twig to change index configuration whitelists. It replaces "attributes" with "columns" in the index keys, introducing a new internal constant KeyIndexesColumns with ["key", "type", "status", "columns", "orders"]. The addTable logic now references KeyIndexesColumns for index whitelisting, replacing KeyIndexes. No control-flow or error-handling changes, and no exported/public entity declarations are altered.

Possibly related PRs

  • fix: type generation with tablesdb #1187: Adjusts whitelist key constants in templates/cli/lib/config.js.twig to align permitted keys for table/column/index definitions, similar to this rename from attributes to columns.

Suggested reviewers

  • abnegate
  • loks0n

Pre-merge checks and finishing touches

✅ 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 clearly describes the key change of renaming the resource field from “attributes” to “columns” for TablesDB indexes, which directly reflects the updates made in the index whitelist logic.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-key-column

📜 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 fc6d378 and 0ab8ddc.

📒 Files selected for processing (1)
  • templates/cli/lib/config.js.twig (2 hunks)
⏰ 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). (18)
  • GitHub Check: build (8.3, WebChromium)
  • GitHub Check: build (8.3, WebNode)
  • GitHub Check: build (8.3, KotlinJava8)
  • GitHub Check: build (8.3, AppleSwift56)
  • GitHub Check: build (8.3, Swift56)
  • GitHub Check: build (8.3, Python311)
  • GitHub Check: build (8.3, Ruby27)
  • GitHub Check: build (8.3, Ruby30)
  • GitHub Check: build (8.3, Python312)
  • GitHub Check: build (8.3, Node20)
  • GitHub Check: build (8.3, Go118)
  • GitHub Check: build (8.3, KotlinJava11)
  • GitHub Check: build (8.3, Python39)
  • GitHub Check: build (8.3, Node16)
  • GitHub Check: build (8.3, FlutterBeta)
  • GitHub Check: build (8.3, FlutterStable)
  • GitHub Check: build (8.3, Android14Java17)
  • GitHub Check: build (8.3, Android5Java17)
🔇 Additional comments (3)
templates/cli/lib/config.js.twig (3)

65-65: LGTM! Consistent terminology for table schema.

The change from "attributes" to "columns" correctly aligns the KeysColumns constant with table terminology.


71-71: LGTM! Correct parallel structure for table indexes.

The new KeyIndexesColumns constant properly mirrors KeyIndexes but uses "columns" instead of "attributes", maintaining the correct distinction between collection and table schemas.


408-408: Approve KeyIndexesColumns update

No references to the old attributes format remain in the codebase; the change is correct and safe.


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
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

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

@ChiragAgg5k ChiragAgg5k merged commit 14617d4 into master Oct 1, 2025
39 checks passed
@ChiragAgg5k ChiragAgg5k deleted the fix-key-column branch October 1, 2025 03:11
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