Skip to content

Conversation

@jezweb
Copy link

@jezweb jezweb commented Nov 8, 2025

Problem

The D1 database ID was hardcoded in drizzle.config.ts, making it difficult to:

  • Switch between different databases (dev/staging/prod)
  • Set up the project for new developers
  • Use different database instances per environment

Solution

Replace the hardcoded ID with CLOUDFLARE_D1_DATABASE_ID environment variable.

Changes

  • drizzle.config.ts: Use process.env.CLOUDFLARE_D1_DATABASE_ID instead of hardcoded value
  • .dev.vars.example: Add CLOUDFLARE_D1_DATABASE_ID with instructions
  • README.md: Document the new environment variable in multiple places:
    • Quick setup section
    • Manual setup section
    • D1 database creation instructions
    • GitHub Actions secrets list

Impact

Developers can now easily configure different database instances per environment without modifying code. The wrangler.jsonc file still requires the actual database_id value as Wrangler doesn't support env var interpolation in config files.

🤖 Generated with Claude Code

Replace hardcoded D1 database ID in drizzle.config.ts with CLOUDFLARE_D1_DATABASE_ID environment variable for better configurability across different environments.

Changes:
- Add CLOUDFLARE_D1_DATABASE_ID to .dev.vars.example
- Update drizzle.config.ts to use env var instead of hardcoded ID
- Document the new env var in README.md with instructions
- Add note about copying database_id when creating D1 database

This allows developers to easily switch between different databases (dev/staging/prod) without modifying code.

Note: wrangler.jsonc still requires the actual database_id value as it doesn't support environment variable interpolation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Nov 8, 2025

Warning

Rate limit exceeded

@jezweb has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 50 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between a44687a and b5c79d7.

📒 Files selected for processing (4)
  • .dev.vars.example (1 hunks)
  • PROJECT_BRIEF.md (1 hunks)
  • README.md (4 hunks)
  • drizzle.config.ts (1 hunks)
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

jezweb pushed a commit to jezweb/full-flare-stack that referenced this pull request Nov 8, 2025
Copy link
Owner

Choose a reason for hiding this comment

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

We don't need this file, can you remove it?

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