-
Notifications
You must be signed in to change notification settings - Fork 21
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
chore: add scheduled_flag_update table and proto message #1535
Conversation
558848e
to
8ca6f84
Compare
Signed-off-by: Alessandro Yuichi Okimoto <[email protected]>
8ca6f84
to
1c00e9f
Compare
enum FieldType { | ||
UNSPECIFIED = 0; | ||
PREREQUISITES = 1; | ||
TARGETS = 2; | ||
RULES = 3; | ||
DEFAULT_STRATEGY = 4; | ||
VARIATIONS = 5; | ||
} |
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.
The field types correspond to the fields found in the Feature
proto message.
We can add new field types in the future if needed.
enum ChangeType { | ||
CHANGE_UNSPECIFIED = 0; | ||
CHANGE_CREATE = 1; | ||
CHANGE_UPDATE = 2; | ||
CHANGE_DELETE = 3; | ||
} |
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.
The allowed change types.
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.
Nice design!
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.
The design LGTM!
Part of #893
Things done
scheduled_flag_update
tablescheduled_flag_update
proto messageQueries examples
Query 1: Filter by Change Type and Field Type Using JSON_CONTAINS
Query 2: Filter by Rule ID and Variation ID Using JSON_CONTAINS
This pull request includes significant changes to the database schema, protobuf definitions, and related code. The main updates involve the creation of a new table for scheduled flag updates, the removal of old protobuf message types, and the addition of new protobuf definitions for scheduled updates.
Database Schema Changes:
scheduled_flag_update
table with necessary fields and foreign key constraints inmigration/mysql/20250226091538_create_scheduled_flag_update_table.sql
.migration/mysql/atlas.sum
to include the new migration file for thescheduled_flag_update
table. [1] [2]Protobuf Changes:
ScheduleUpdate
andScheduleUpdateListValue
message types fromproto/feature/feature.pb.go
andproto/feature/feature.proto
. [1] [2] [3] [4] [5]ScheduledChange
andScheduledFlagUpdate
inproto/feature/scheduled_update.proto
.UI Changes:
ui/web-v2/src/proto/feature/scheduled_update_pb_service.js
to reflect the new protobuf definitions.