-
Notifications
You must be signed in to change notification settings - Fork 21
Add missing DealConfig columns to preparations table #549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Sankara-Jefferson
wants to merge
9
commits into
develop
Choose a base branch
from
fix/add-missing-deal-config-columns
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add GetBalanceHandler to retrieve FIL and FIL+ datacap balances - Implement Lotus API integration for balance queries - Add comprehensive test suite with 18 test cases - Add CLI wallet balance command with JSON output support - Add API route GET /wallet/{address}/balance - Add complete documentation for balance command - Support both human-readable and raw balance formats - Include error handling for partial failures Resolves wallet balance retrieval requirements
… table - Add migration 202507141000_add_deal_notes_to_preparations.go to fix missing deal_config_* columns - Fix SQLite compatibility in 202507090915_add_not_null_defaults.go by removing unsupported ALTER COLUMN syntax - Update migrations.go to register new migration This resolves the GORM scanning error: 'table preparations has no column named deal_config_deal_notes' The migration adds the following columns to the preparations table: - deal_config_deal_notes (TEXT) - deal_config_deal_force (BOOLEAN) - deal_config_deal_allowed_piece_cids (JSON) - deal_config_schedule_cron (VARCHAR) - deal_config_schedule_deal_number (INTEGER) - deal_config_schedule_deal_size (VARCHAR) - deal_config_total_deal_number (INTEGER) - deal_config_total_deal_size (VARCHAR) - deal_config_max_pending_deal_number (INTEGER) - deal_config_max_pending_deal_size (VARCHAR) - deal_config_http_headers (JSON)
- Fixed JSON tag in BalanceResponse (balanceAttoFil) - Applied gofmt for code formatting - Updated migrations and ran singularity admin init - Regenerated CLI/API documentation - Removed deprecated deal-template docs - Added new deal-schedule-template docs These changes address CI failures and ensure documentation matches the current codebase.
- Added 'singularity admin init' to docgen.sh to prevent migration panic during doc generation - Fixes CI and local docgen errors
lanzafame
suggested changes
Jul 16, 2025
if err != nil { | ||
logger.Errorw("failed to lookup state for wallet address", "addr", addr, "err", err) | ||
return nil, errors.Join(handlererror.ErrInvalidParameter, errors.Wrap(err, "failed to lookup actor ID")) | ||
return nil, fmt.Errorf("failed to lookup state for wallet address %s: %w", addr.String(), err) |
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.
@Sankara-Jefferson This change is the reason for the test failures.
Can we close this. or is it still relevant? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This occurred because the [Preparation] model includes an embedded DealConfig struct, but the database schema was missing the corresponding columns that GORM expected to find.
This PR adds a comprehensive database migration to resolve the schema mismatch:
New Migration: [202507141000_add_deal_notes_to_preparations.go]
Adds the following missing columns to the preparations table:
SQLite Compatibility Fix
Updated [202507090915_add_not_null_defaults.go] to remove PostgreSQL-specific ALTER COLUMN syntax that is not supported in SQLite, ensuring cross-database compatibility.
Changes Made
Created new migration file with proper up/down migration logic
Updated migration registry in [migrations.go]
Fixed existing migration for SQLite compatibility
Added comprehensive rollback functionality
Testing