my @values = map { _quote( $self->getfield($_), $self->table, $_) } @fields;
"INSERT INTO h_". $self->table. " ( ".
- join(', ', qw(history_date history_user history_action), @fields ).
+ join(', ', qw(history_date history_usernum history_action), @fields ).
") VALUES (".
join(', ', $time,
- dbh->quote( $FS::CurrentUser::CurrentUser->username ),
+ $FS::CurrentUser::CurrentUser->usernum,
dbh->quote($action),
@values
).
DBIx::DBSchema::Column->new( {
'name' => 'history_user',
'type' => 'varchar',
- 'null' => 'NOT NULL',
+ 'null' => 'NULL',
'length' => '80',
'default' => '',
'local' => '',
} ),
DBIx::DBSchema::Column->new( {
+ 'name' => 'history_usernum',
+ 'type' => 'int',
+ 'null' => 'NULL',
+ 'length' => '',
+ 'default' => '',
+ 'local' => '',
+ } ),
+ DBIx::DBSchema::Column->new( {
'name' => 'history_action',
'type' => 'varchar',
'null' => 'NOT NULL',