https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21610

--- Comment #9 from Marcel de Rooy <[email protected]> ---
About this code:
                if ( $columns_info->{$col}->{is_nullable} ) {
                    # If nullable, default to null
                    $self->$col(undef);
                } else {
                    # If cannot be null, get the default value
                    # What if cannot be null and does not have a default value?
Possible?
                    $self->$col($columns_info->{$col}->{default_value});

TRY:
alter table borrowers add column notpossible int NOT NULL;
So yes, it is possible.
For now, I would recommend to change the last statement to:
$self->$col( $columns_info->{$col}->{default_value} // 0 );

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to