[x] Patches PR #654 to support SQL schemas outside of "public". Cannot directly use keyword "schema" due to circular type constraint error in definition PublicTableNameOrOptions.
[x] Update type generation tests to reflect updated TypeScript types, with local run of npm run test confirming 96 tests passed.
Addresses GitHub issue #716.
What is the current behavior?
When running:
PG_META_GENERATE_TYPES_INCLUDED_SCHEMAS=openai PG_META_DB_URL=postgresql://postgres:postgres@127.0.0.1:54322/postgres npm run gen:types:typescript
Against a Supabase instance where database is at postgresql://postgres:postgres@127.0.0.1:54322/postgres and has schema openai among others, types Table, TablesInsert, TablesUpdate, and Enums result in type errors because schema public is not defined.
What is the new behavior?
Against a Supabase instance where database is at postgresql://postgres:postgres@127.0.0.1:54322/postgres and has schema openai among others, types Table, TablesInsert, TablesUpdate, and Enums do not result in type errors.
What kind of change does this PR introduce?
[x] Patches PR #654 to support SQL schemas outside of "public". Cannot directly use keyword "schema" due to circular type constraint error in definition
PublicTableNameOrOptions
. [x] Update type generation tests to reflect updated TypeScript types, with local run ofnpm run test
confirming 96 tests passed.Addresses GitHub issue #716.
What is the current behavior?
When running:
Against a Supabase instance where database is at
postgresql://postgres:postgres@127.0.0.1:54322/postgres
and has schemaopenai
among others, typesTable
,TablesInsert
,TablesUpdate
, andEnums
result in type errors because schemapublic
is not defined.What is the new behavior?
Against a Supabase instance where database is at
postgresql://postgres:postgres@127.0.0.1:54322/postgres
and has schemaopenai
among others, typesTable
,TablesInsert
,TablesUpdate
, andEnums
do not result in type errors.Additional context
N/A.