-
Notifications
You must be signed in to change notification settings - Fork 3
🗃️ DB schema changes #162
base: fee-code-location-move
Are you sure you want to change the base?
🗃️ DB schema changes #162
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the database schema by replacing the fee_run and fee table structure with a simplified fee_batch table design. The changes consolidate the previous two-table relationship into a single table with a new enum type for status management.
Key changes:
- Removes the existing
fee_runandfeetables along with their associated view, indexes, and relationships - Introduces a new
fee_batch_statusenum type andfee_batchtable with consolidated fields - Adds a new plugin ID 'vultisig-dca-0000' to the plugin_id enum
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| storage/postgres/schema/schema.sql | Updates the complete schema with new fee_batch table structure and removes old fee-related tables |
| storage/postgres/migrations/plugin/20250630152230_fee_runs.sql | Modifies the migration to create fee_batch instead of fee_run/fee tables |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| created_at TIMESTAMP DEFAULT NOW(), | ||
| updated_at TIMESTAMP DEFAULT NOW(), |
Copilot
AI
Aug 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timestamp columns use different data types than the schema.sql file. Here created_at uses TIMESTAMP while in schema.sql it uses timestamp with time zone. This inconsistency could lead to timezone-related issues.
| created_at TIMESTAMP DEFAULT NOW(), | |
| updated_at TIMESTAMP DEFAULT NOW(), | |
| created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), | |
| updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), |
| created_at TIMESTAMP DEFAULT NOW(), | ||
| updated_at TIMESTAMP DEFAULT NOW(), |
Copilot
AI
Aug 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timestamp columns use different data types than the schema.sql file. Here updated_at uses TIMESTAMP while in schema.sql it uses timestamp with time zone. This inconsistency could lead to timezone-related issues.
| created_at TIMESTAMP DEFAULT NOW(), | |
| updated_at TIMESTAMP DEFAULT NOW(), | |
| created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), | |
| updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), |
| DROP TRIGGER IF EXISTS update_fee_run_updated_at ON fee_run; | ||
|
|
||
| -- Drop function | ||
| DROP FUNCTION IF EXISTS update_updated_at_column(); |
Copilot
AI
Aug 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The migration drops the update_updated_at_column() function in the Down section, but this function may be used by other tables or triggers in the database. Dropping it could break other functionality that depends on this shared function.
| DROP FUNCTION IF EXISTS update_updated_at_column(); |
413e858 to
be40a87
Compare
4caaa4e to
09f218e
Compare
be40a87 to
717d8ae
Compare
09f218e to
e7ef35f
Compare
No description provided.