Problem
InitializeTables() is invoked in the tabular create flow, so each create request performs schema-init checks for global metadata tables (entity_attributes, attribute_schemas).
Why this is bad
- Adds unnecessary DB roundtrips on every create
- Increases request latency and DB load
- Mixes one-time infrastructure bootstrap with hot-path request handling
Current behavior
Per-request create path calls InitializeTables().
Expected behavior
InitializeTables() should run once at service startup/bootstrap, not per create request.
Proposed fix
- Remove InitializeTables() call from tabular CreateResolve request path
- Call InitializeTables() once during core startup after Postgres repo creation
- Ensure test/e2e bootstrap handles DB-reset scenarios (so startup-only init remains reliable)
Acceptance criteria
- No InitializeTables() call in per-request tabular create path
- Startup fails fast if initialization fails
- Create requests no longer perform schema-init overhead
- E2E still passes with explicit bootstrap/restart after DB reset
Relevant files
- opengin/core-api/engine/attribute_resolver.go
- opengin/core-api/cmd/server/service.go
- opengin/core-api/db/repository/postgres/postgres_client.go
Problem
InitializeTables() is invoked in the tabular create flow, so each create request performs schema-init checks for global metadata tables (entity_attributes, attribute_schemas).
Why this is bad
Current behavior
Per-request create path calls InitializeTables().
Expected behavior
InitializeTables() should run once at service startup/bootstrap, not per create request.
Proposed fix
Acceptance criteria
Relevant files