Skip to content

Instantly share code, notes, and snippets.

@mosheeshel
Created October 20, 2021 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mosheeshel/97b2874f169690d5ddb076e1782055e3 to your computer and use it in GitHub Desktop.
Save mosheeshel/97b2874f169690d5ddb076e1782055e3 to your computer and use it in GitHub Desktop.
A thought about a model for a Feature Flag system (really basic)
erDiagram
Project ||..|{ Environment :has
Project ||..|{ FeatureFlag :has
Environment ||..|{ Segment :has
Environment ||..|{ EnvironmentFeatureFlag : has
FeatureFlag ||..|{ EnvironmentFeatureFlag : has
EnvironmentFeatureFlag ||..|{ UserTargeting : has
Segment ||..|{ UserTargeting : has
Audit
Workflow
Users ||..|{ UserPermissions : has
Audit {
uuid id
uuid entity_id
timestamp change_date
blob change
}
Users {
uuid id
string username
}
EnvironmentFeatureFlag {
uuid id
uuid environment_id
uuid feature_flag_id
string defaultValue
}
UserTargeting {
uuid id
uuid environment_feature_flag_id
string target
}
FeatureFlag {
uuid id
uuid project_id
string name
string description
int type
string defaultValueOn
string defaultValueOff
}
Project {
uuid id
string name
string description
}
Environment {
uuid id
uuid project_id
string name
string description
}
Segment {
uuid id
uuid environment_id
string name
string description
}
@mosheeshel
Copy link
Author

This Markdown syntax is supported by https://mermaid-js.github.io/ project
https://mermaid-js.github.io/mermaid-live-editor/
This is the visual representation
image

Feel free to comment on this with your thoughts as to how to push ahead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment