-
Notifications
You must be signed in to change notification settings - Fork 79
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
[2/2][FA migration] Complete fa migration and rename table #494
Conversation
last_transaction_timestamp -> Nullable<Timestamp>, | ||
inserted_at -> Timestamp, | ||
#[max_length = 1000] | ||
asset_type -> Nullable<Varchar>, |
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.
This should not be nullable
is_frozen -> Bool, | ||
amount_v1 -> Nullable<Numeric>, | ||
amount_v2 -> Nullable<Numeric>, | ||
amount -> Nullable<Numeric>, |
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.
This should not be nullable
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.
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.
Synced offline, this will be fixed in next PR
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.
this isn't related to this PR. only popped up due to renaming table. We'll address it next PR.
asset_type_v2 -> Nullable<Varchar>, | ||
#[max_length = 1000] | ||
asset_type_v1 -> Nullable<Varchar>, | ||
is_primary -> Nullable<Bool>, |
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.
This shouldn't be nullable to match with the legacy schema
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.
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.
Synced offline, this will be fixed in next PR
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.
this isn't related to this PR. only popped up due to renaming table. We'll address it next PR.
#[max_length = 1000] | ||
asset_type -> Nullable<Varchar>, | ||
#[max_length = 10] | ||
token_standard -> Nullable<Varchar>, |
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.
This shouldn't be nullable either
@@ -0,0 +1,15 @@ | |||
-- Your SQL goes here | |||
ALTER TABLE current_unified_fungible_asset_balances_to_be_renamed | |||
ADD COLUMN IF NOT EXISTS asset_type VARCHAR(1000) NOT NULL GENERATED ALWAYS AS (COALESCE(asset_type_v1, asset_type_v2)) STORED; |
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.
We need to redo this migration because it has already been applied to the mainnet and testnet db.
asset_type_v2 -> Nullable<Varchar>, | ||
#[max_length = 1000] | ||
asset_type_v1 -> Nullable<Varchar>, | ||
is_primary -> Nullable<Bool>, |
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.
Synced offline, this will be fixed in next PR
is_frozen -> Bool, | ||
amount_v1 -> Nullable<Numeric>, | ||
amount_v2 -> Nullable<Numeric>, | ||
amount -> Nullable<Numeric>, |
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.
Synced offline, this will be fixed in next PR
current_unified_fungible_asset_balances
current_unified_fungible_asset_balances_to_be_renamed
[This PR]
3. Add generated columns back in dbeaver
4. Create new migration with added columns. Then remove KS.
5. Rename
current_fungible_asset_balances
tocurrent_fungible_asset_balances_legacy
6. Rename
current_unified_fungible_asset_balances_to_be_renamed
tocurrent_fungible_asset_balances