Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All columns are output as optional #4

Closed
phiresky opened this issue Jul 23, 2017 · 0 comments
Closed

All columns are output as optional #4

phiresky opened this issue Jul 23, 2017 · 0 comments

Comments

@phiresky
Copy link

for this postgresql table definition:

                                        Table "seeds"
   Column    |           Type           |                         Modifiers                          
-------------+--------------------------+------------------------------------------------------------
 id          | bigint                   | not null default nextval('seeds_id_seq'::regclass)
 created     | timestamp with time zone | not null default now()
 user_id     | bigint                   | not null
 server_seed | text                     | not null
 client_seed | text                     | not null
 last_nonce  | integer                  | not null
 active      | boolean                  | not null

sql-ts outputs the following typescript:

  export interface seeds {
    id?: string | null
    created?: string | null
    user_id?: string | null
    server_seed?: string | null
    client_seed?: string | null
    last_nonce?: string | null
    active?: boolean | null
  }

Even though none of the columns should be able to be undefined or null.

@rmp135 rmp135 closed this as completed in e400e9a Jul 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant