diff --git a/README.md b/README.md index 573b8c77..d468b0d1 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,8 @@ To start developing, run `npm run dev`. It will set up the database with Docker If you are fixing a bug, you should create a new test case. To test your changes, add the `-u/--updateSnapshot` flag to `jest` on the `test:run` script, run `npm run test`, and then review the git diff of the snapshots. Depending on your change, you may see `id` fields being changed - this is expected and you are free to commit it, as long as it passes the CI. Don't forget to remove the `-u/--updateSnapshot` flag when committing. To make changes to the TypeScript type generation, run `npm run gen:types:typescript` while you have `npm run dev` running. +To use your own database connection string instead of the provided test database, run: +`PG_META_DB_URL=postgresql://postgres:postgres@localhost:5432/postgres npm run gen:types:typescript` ## Licence diff --git a/src/lib/sql/types.sql b/src/lib/sql/types.sql index 1f1fe22c..d0974012 100644 --- a/src/lib/sql/types.sql +++ b/src/lib/sql/types.sql @@ -29,7 +29,7 @@ from pg_class c join pg_attribute a on a.attrelid = c.oid where - c.relkind = 'c' + c.relkind = 'c' and not a.attisdropped group by c.oid ) as t_attributes on t_attributes.oid = t.typrelid