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: strategy variant migrations #4225

Merged
merged 2 commits into from
Jul 13, 2023
Merged

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Jul 13, 2023

About the changes

Adding variants JSONB column to strategies that will allow subsequent PRs introduce support for the strategy variants.
It's less than 10 LOC, most of the code is the old view definition with a new line added.
More comments inline.

Important files

Discussion points

@sonatype-lift
Copy link

sonatype-lift bot commented Jul 13, 2023

Sonatype Lift is retiring

Sonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console.
We are extremely grateful and thank you for your support over the years.

📖 Read about the impacts and timeline

@vercel
Copy link

vercel bot commented Jul 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Jul 13, 2023 6:27am
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Jul 13, 2023 6:27am

exports.up = function (db, callback) {
db.runSql(
`
ALTER TABLE feature_strategies ADD COLUMN IF NOT EXISTS variants JSONB DEFAULT '[]'::jsonb NOT NULL;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

new column

fss.segment_id as segments,
feature_strategies.title as strategy_title,
feature_strategies.disabled as strategy_disabled,
feature_strategies.variants as strategy_variants
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the only new line compared to the previous view
Screenshot 2023-07-13 at 08 20 11

feature_strategies.sort_order as sort_order,
fss.segment_id as segments,
feature_strategies.title as strategy_title,
feature_strategies.disabled as strategy_disabled
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the only new line compared to the previous rollback code
Screenshot 2023-07-13 at 08 20 15

Copy link
Contributor

@andreas-unleash andreas-unleash left a comment

Choose a reason for hiding this comment

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

LG

@kwasniew kwasniew merged commit bfa2084 into main Jul 13, 2023
10 checks passed
@kwasniew kwasniew deleted the strategy-variants-migration branch July 13, 2023 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants