zernonia / supabase-schema

Secured & Simple Supabase Schema Visualizer
https://supabase-schema.vercel.app/
MIT License
809 stars 47 forks source link

Generate schema fields with double quotes #16

Open lyqht opened 2 years ago

lyqht commented 2 years ago

Description

In one of my projects that used supabase-schema to generate the SQL scripts, many of fields use camelcase, hence the generated script by default does not work since Postgres require camelcase/uppercase fields to be included in double quotes. e.g. sourceRepo needs to be "sourceRepo"

Example Screenshot

Current fields that are generated

image

Running the above script will create the fields all in small caps, and all the calls to supabase DB from app will fail due to wrong schema.

Suggested solution

Hence, this issue is requesting for the generated script to include quotes. P.S. I can also work on this if u can include hacktoberfest label to this 😄

zernonia commented 2 years ago

Thanks @lyqht for reporting this! You are right that camelCase need to be wrapped in double quotes.
I will set this as Bug. 😁