go-gorm / sqlite

GORM sqlite driver
MIT License
179 stars 184 forks source link

Issue #158 SQLite fields are nullible unless `NOT NULL` #159

Closed ChrisPortman closed 1 year ago

ChrisPortman commented 1 year ago

What did this pull request do?

This change sets the default value of ColumnType.Nullable() to true. If the column is explicitly NOT NULL then it will be set false.

This is consistent with the SQLite documentation: https://www.sqlitetutorial.net/sqlite-not-null-constraint/

User Case Description

Correct reporting of nullable state for a column that does not specify NULL explicitly