codegen: handle nullable foreign keys using 'ifnull' and add a test case for them
All checks were successful
CI / build-docker (push) Successful in 18s
CI / build-docker-bootstrap (push) Has been skipped
CI / release-test (push) Successful in 1m2s

This commit is contained in:
wispem-wantex
2026-01-26 16:00:19 -08:00
parent e85a68e69d
commit a0d0461f06
2 changed files with 9 additions and 2 deletions

View File

@@ -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