Skip to content

Generation of 'falsey' values is omitted from dbml and sql #65

Description

@eakoli

When the default value is "falsey"

Table users {
  id integer [primary key]
  age integer [not null, default: 0]    
  deceased boolean [not null, default: False]    
}

The default is completely omitted from the generated dbml and sql

Table users {
  id integer [primary key]
  age integer [not null]    
  deceased boolean [not null]    
}
CREATE "users" ( 
  "id" integer PRIMARY KEY, 
  "age" integer NOT NULL, 
  "deceased" boolean NOT NULL,

The should be generated as

-  age integer [not null]    
+   age integer [default: 0, not null]    
-  deceased boolean [not null]    
+  deceased boolean [default: false, not null]    

and

-  "age" integer NOT NULL,    
+  "age" integer NOT NULL DEFAULT 0,    
-  "deceased" boolean NOT NULL,    
+  "deceased" boolean NOT NULL DEFAULT false,    

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions