Feature flag service database schema

How a feature management platform stores its data: flags and variations, per-environment settings, ordered targeting rules, reusable segments, percentage rollouts with deterministic bucketing, scheduled changes and a full audit trail.

Feature Flags ER diagram

Feature flag service database schema n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 users idBIGINT emailVARCHAR full_nameVARCHAR is_activeBOOLEAN created_atTIMESTAMPTZ projects idBIGINT keyVARCHAR nameVARCHAR created_atTIMESTAMPTZ environments idBIGINT project_idBIGINT keyVARCHAR nameVARCHAR sdk_key_hashVARCHAR is_productionBOOLEAN requires_approvalBOOLEAN created_atTIMESTAMPTZ flags idBIGINT project_idBIGINT keyVARCHAR nameVARCHAR descriptionTEXT kindVARCHAR is_permanentBOOLEAN archived_atTIMESTAMPTZ created_by_idBIGINT created_atTIMESTAMPTZ flag_variations idBIGINT flag_idBIGINT keyVARCHAR nameVARCHAR value_jsonJSONB ordinalSMALLINT flag_environment_se… idBIGINT flag_idBIGINT environment_idBIGINT is_enabledBOOLEAN on_variation_idBIGINT off_variation_idBIGINT bucket_saltVARCHAR versionINTEGER updated_by_idBIGINT updated_atTIMESTAMPTZ segments idBIGINT project_idBIGINT keyVARCHAR nameVARCHAR descriptionTEXT created_atTIMESTAMPTZ targeting_rules idBIGINT setting_idBIGINT ordinalSMALLINT descriptionVARCHAR segment_idBIGINT variation_idBIGINT bucket_byVARCHAR created_atTIMESTAMPTZ clauses idBIGINT rule_idBIGINT segment_idBIGINT ordinalSMALLINT attributeVARCHAR operatorVARCHAR values_jsonJSONB negateBOOLEAN rule_rollouts rule_idBIGINT variation_idBIGINT weight_bpsINTEGER scheduled_changes idBIGINT setting_idBIGINT scheduled_forTIMESTAMPTZ change_jsonJSONB stateVARCHAR approved_by_idBIGINT applied_atTIMESTAMPTZ failure_reasonVARCHAR created_by_idBIGINT created_atTIMESTAMPTZ evaluation_events idBIGINT flag_idBIGINT environment_idBIGINT variation_idBIGINT rule_idBIGINT context_keyVARCHAR reasonVARCHAR settings_versionINTEGER sample_weightINTEGER evaluated_atTIMESTAMPTZ flag_audit_log idBIGINT flag_idBIGINT environment_idBIGINT actor_idBIGINT actor_kindVARCHAR actionVARCHAR before_stateJSONB after_stateJSONB commentVARCHAR created_atTIMESTAMPTZ

Related database schemas