Please sign in to comment.
Explicitly mark primary keys as NOT NULL on SQLite
SQLite, in violation of the SQL standard, does not consider primary keys as being NOT NULL. For integer primary keys, it automatically makes them autoincrementing, so if you attempt to insert NULL, it just ignores you and uses the next autoincrementing integer. For non-Integer primary keys, it will happily allow NULL values. This explicitly marks primary key columns as NOT NULL, so SQLite behaves more like other SQL databases.
- Loading branch information...
Showing with 13 additions and 0 deletions.