Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunMigrations ¶
func RunMigrations(cfg MigrationConfig) error
RunMigrations runs the migrations for the given config. This function is exposed to allow embedding openFGA into applications and manage OpenFGA's database schema migrations directly. When OpenFGA is used as a library, the embedding application may have its own migration system that differs from OpenFGA's use of goose. By exposing this function, applications can: 1. Explicitly control when OpenFGA migrations run 2. Integrate OpenFGA's schema updates into their own migration workflows 3. Perform versioned upgrades of the schema as needed The function handles migrations for multiple database engines (postgres, mysql, sqlite) and supports both upgrading and downgrading to specific versions.