Skip to content
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

feat: add support for new statement properties #870

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Jun 18, 2024

Related to snapshot-labs/sx-monorepo#407

Return new statement properties

@wa0x6e wa0x6e marked this pull request as ready for review June 18, 2024 12:38
@wa0x6e wa0x6e requested a review from ChaituVR June 18, 2024 12:38
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Additional details and impacted files

📢 Thoughts on this report? Let us know!

@ChaituVR
Copy link
Member

Whats the SQL command to change prod DB?

@wa0x6e
Copy link
Contributor Author

wa0x6e commented Jun 18, 2024

Whats the SQL command to change prod DB?

Don't have any yet, I used a GUI

@ChaituVR
Copy link
Member

wdyt about

ALTER TABLE statements
MODIFY id VARCHAR(66) NOT NULL,
MODIFY delegate VARCHAR(100) NOT NULL,
MODIFY space VARCHAR(100) NOT NULL,
ADD COLUMN network VARCHAR(24) NOT NULL DEFAULT 's',
ADD COLUMN discourse VARCHAR(64),
ADD COLUMN status VARCHAR(24) NOT NULL DEFAULT 'inactive',
DROP PRIMARY KEY,
ADD PRIMARY KEY (delegate, space, network),
ADD INDEX space (space),
ADD INDEX network (network),
ADD INDEX status (status);

@ChaituVR
Copy link
Member

why default to inactive?

@wa0x6e
Copy link
Contributor Author

wa0x6e commented Jun 18, 2024

why default to inactive?

Decided by Fabien

@wa0x6e
Copy link
Contributor Author

wa0x6e commented Jun 18, 2024

wdyt about

ALTER TABLE statements
MODIFY id VARCHAR(66) NOT NULL,
MODIFY delegate VARCHAR(100) NOT NULL,
MODIFY space VARCHAR(100) NOT NULL,
ADD COLUMN network VARCHAR(24) NOT NULL DEFAULT 's',
ADD COLUMN discourse VARCHAR(64),
ADD COLUMN status VARCHAR(24) NOT NULL DEFAULT 'inactive',
DROP PRIMARY KEY,
ADD PRIMARY KEY (delegate, space, network),
ADD INDEX space (space),
ADD INDEX network (network),
ADD INDEX status (status);

Seems good. Maybe also proceed to the COLLATON change, since this table is small, and not related to anything else

Copy link
Member

@ChaituVR ChaituVR left a comment

Choose a reason for hiding this comment

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

utAck

@ChaituVR ChaituVR merged commit 3a8be6b into master Jun 18, 2024
4 checks passed
@ChaituVR ChaituVR deleted the feat-add-support-for-new-statement-properties branch June 18, 2024 18:37
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.

None yet

2 participants