Skip to content

Conversation

@citrusinesis
Copy link
Contributor

@citrusinesis citrusinesis commented Sep 19, 2025

Summary by CodeRabbit

  • New Features
    • Funding rates are now segmented by network (Mainnet/Testnet), improving clarity and accuracy in related views and reports.
    • Faster loading of funding rate data thanks to new indexing.
  • Chores
    • Added migration scripts to streamline database updates and maintenance.

@coderabbitai
Copy link

coderabbitai bot commented Sep 19, 2025

Walkthrough

Adds Prisma migration tooling scripts, introduces a new funding_rates table, and extends it with a Network enum column (default Mainnet) plus indexes. Updates Prisma schema accordingly and adds a migration lock file. No runtime application code changes.

Changes

Cohort / File(s) Summary
NPM scripts (database)
packages/database/package.json
Added scripts: migrate (dev create-only), migrate:deploy, migrate:reset.
Prisma migrations (SQL)
packages/database/prisma/migrations/20250919101430_init/migration.sql, packages/database/prisma/migrations/20250919101650_add_network_enum/migration.sql
Initial migration creates funding_rates table with indexes on ticker and createdAt. Subsequent migration adds Network enum, network column (NOT NULL, default 'Mainnet'), and index on network.
Prisma schema & config
packages/database/prisma/schema.prisma, packages/database/prisma/migrations/migration_lock.toml
Schema adds Network enum, network field to FundingRates, and index on network. Added migration_lock.toml with provider=postgresql.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I thump my paws—migrations hop in line,
New tables sprout, enums crisp and fine.
Mainnet by default, Testnet on the breeze,
Indexes whisper through the database trees.
With scripts to guide each tidy leap—
Our burrow’s data runs swift and deep. 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Free

📥 Commits

Reviewing files that changed from the base of the PR and between ba7598d and c9144fa.

📒 Files selected for processing (5)
  • packages/database/package.json (1 hunks)
  • packages/database/prisma/migrations/20250919101430_init/migration.sql (1 hunks)
  • packages/database/prisma/migrations/20250919101650_add_network_enum/migration.sql (1 hunks)
  • packages/database/prisma/migrations/migration_lock.toml (1 hunks)
  • packages/database/prisma/schema.prisma (1 hunks)

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

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

@citrusinesis citrusinesis merged commit be940e3 into main Sep 19, 2025
4 checks passed
@citrusinesis citrusinesis deleted the citrus/migration branch September 19, 2025 10:32
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