From: Ivan Kohler Date: Fri, 17 May 2013 20:22:37 +0000 (-0700) Subject: history_user -> history_usernum X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=67a2ec7e476c9a78092f451cc1d1f2e09ac39700 history_user -> history_usernum --- 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',