codegen: handle nullable foreign keys using 'ifnull' and add a test case for them
This commit is contained in:
@@ -31,9 +31,12 @@ cd $test_project
|
||||
|
||||
# Create a new table in the schema
|
||||
cat >> pkg/db/schema.sql <<EOF
|
||||
create table item_flavor (rowid integer primary key, name text not null) strict;
|
||||
|
||||
create table items (
|
||||
rowid integer primary key,
|
||||
description text not null default ''
|
||||
description text not null default '',
|
||||
flavor integer references item_flavor(rowid)
|
||||
) strict;
|
||||
EOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user