Added not-null constraints to some auto-created database columns.
Fixed acceptance test.