summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/Record.pm4
-rw-r--r--FS/FS/Schema.pm10
2 files changed, 11 insertions, 3 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 3886c3333..cdbcae049 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -1907,10 +1907,10 @@ sub _h_statement {
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
).
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 1da302d5e..5f1611cf7 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -267,12 +267,20 @@ sub dbdef_dist {
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',