From 67a2ec7e476c9a78092f451cc1d1f2e09ac39700 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Fri, 17 May 2013 13:22:37 -0700 Subject: [PATCH] history_user -> history_usernum --- FS/FS/Record.pm | 4 ++-- FS/FS/Schema.pm | 10 +++++++++- 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', -- 2.11.0