|
ORE Studio 0.0.4
|
Seeds system flags in the database at startup. More...
#include <system_flags_seeder.hpp>

Public Member Functions | |
| system_flags_seeder (database::context ctx) | |
| Constructs a system_flags_seeder. | |
| std::size_t | seed () |
| Seeds all system flags into the database. | |
Seeds system flags in the database at startup.
The system_flags_seeder ensures that all well-known system flags exist in the database with their default values. This should be called early during service startup, before any component queries system flags.
The seeder only creates flags that don't already exist - it does not overwrite existing flag values, preserving any user modifications.
This is idempotent - running it multiple times will not create duplicate entries.
|
explicit |
Constructs a system_flags_seeder.
| ctx | The database context to be used by the underlying repository. |
| std::size_t seed | ( | ) |
Seeds all system flags into the database.
Iterates through the compile-time manifest of system flags and creates any flags that don't already exist in the database. Existing flags are left unchanged.