Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Support {} behavior for asset field accounts - Closes #3717 #3719

Merged
merged 6 commits into from
May 27, 2019

Conversation

michielmulders
Copy link
Contributor

What was the problem?

Currently, the account field in accounts column holds null if we don't pass a JSON object for asset field.

How did I fix it?

Modify behavior to store empty object {}.

How to test it?

Run tests and check in DB if all accounts have {} under asset field.

Review checklist

Copy link
Contributor

@lsilvs lsilvs left a comment

Choose a reason for hiding this comment

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

If the default value for asset is now {}, we need a migration to update the existing entries.

@michielmulders
Copy link
Contributor Author

Or we include this in release/2.0?

Current migration ALTER TABLE "mem_accounts" ADD COLUMN IF NOT EXISTS "asset" jsonb NOT NULL DEFAULT '{}'::jsonb;

@MaciejBaj
Copy link
Contributor

Shouldn't affect any block processing functions

@michielmulders
Copy link
Contributor Author

@MaciejBaj no should not

@shuse2 shuse2 merged commit 59c6884 into release/2.1.0 May 27, 2019
@shuse2 shuse2 deleted the 3717-asset-as-object branch May 27, 2019 14:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants