-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
GCORM can run with only .gcorm files, but a config file is useful for larger
projects.
GCORM looks for:
gco.config.yaml
gco.config.yml
Discovery order:
- Explicit
--config <path>. -
gco.config.yamlorgco.config.ymlin the current directory. - Parent directory search, up to five levels.
-
GCO_CONFIGenvironment variable. - Built-in defaults.
schemaRoots:
- schema
migrationDir: migrations
shadowDatabaseURL: ""
generators:
client: gco-go
format:
indentWidth: 2schemaRoots:
schemaRoots:
- schema
- modules/billing/schemaDirectories or files searched for .gcorm files. Relative paths are resolved
from the current working directory.
migrationDir:
migrationDir: migrationsDirectory used by migration commands. Defaults to migrations.
shadowDatabaseURL:
shadowDatabaseURL: postgresql://localhost/shadow?sslmode=disableReserved for workflows that need a separate comparison database.
generators:
generators:
client: gco-goNamed generator settings. Current Go generation is primarily driven by the
generator block in the schema.
format.indentWidth:
format:
indentWidth: 2Indent width used by schema formatting.
When schemaRoots is not set, GCORM searches:
schema/prisma/- The current directory
If both schema/ and prisma/ exist, GCORM asks you to pass --schema or set
schemaRoots to avoid ambiguity.
GCO_CONFIG points to a config file:
export GCO_CONFIG=/path/to/gco.config.yamlDatasource URLs can also come from schema env() calls:
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}