Browse files

add 'realname' column to opr_user.

  • Loading branch information...
1 parent 32a187f commit 8884c16b2157aa31344db88681197d85f94970e3 @reneeb committed Mar 3, 2011
View
4 create_schema.pl
@@ -6,11 +6,11 @@
use FabForce::DBDesigner4::DBIC;
my $file = 'D:\SVNRepo\PerlServices\software\OPR\docs\er_modell.xml';
-my $sql = 'D:\Git\OPAR\opar-sources\documents\er_modell.sql';
+my $sql = 'D:\Git\OPAR\opar-web\documents\er_modell.sql';
my $dbic = FabForce::DBDesigner4::DBIC->new();
$dbic->namespace( 'OTRS::OPR::DB' );
-$dbic->output_path( 'D:\Git\OPAR\opar-sources\lib\\' );
+$dbic->output_path( 'D:\Git\OPAR\opar-web\lib\\' );
$dbic->schema_name( 'Schema' );
$dbic->create_schema( $file );
View
4 documents/er_modell.sql
@@ -8,7 +8,8 @@ CREATE TABLE `opr_user` (
website VARCHAR(255) ,
mail VARCHAR(255) NOT NULL,
active TINYINT ,
- registered INTEGER,
+ registered INTEGER ,
+ realname VARCHAR(255),
PRIMARY KEY(user_id)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -153,6 +154,7 @@ DROP TABLE IF EXISTS `opr_temp_passwd`;
CREATE TABLE `opr_temp_passwd` (
id INTEGER NOT NULL AUTO_INCREMENT,
+ user_id INTEGER NOT NULL,
token VARCHAR(255) ,
created INTEGER,
PRIMARY KEY(id)
View
7 lib/OTRS/OPR/DB/Schema/Result/opr_temp_passwd.pm
@@ -8,13 +8,16 @@ __PACKAGE__->load_components( qw/PK::Auto Core/ );
__PACKAGE__->table( 'opr_temp_passwd' );
__PACKAGE__->add_columns( qw/
id
+ user_id
token
created
- user_id
/);
__PACKAGE__->set_primary_key( qw/ id / );
+__PACKAGE__->belongs_to(opr_user => 'OTRS::OPR::DB::Schema::Result::opr_user',
+ { 'foreign.user_id' => 'self.user_id' });
+
-1;
+1;
View
4 lib/OTRS/OPR/DB/Schema/Result/opr_user.pm
@@ -15,13 +15,17 @@ __PACKAGE__->add_columns( qw/
mail
active
registered
+ realname
/);
__PACKAGE__->set_primary_key( qw/ user_id / );
__PACKAGE__->has_many( opr_package_author => 'OTRS::OPR::DB::Schema::Result::opr_package_author',
{ 'foreign.user_id' => 'self.user_id' });
+__PACKAGE__->has_many( opr_temp_passwd => 'OTRS::OPR::DB::Schema::Result::opr_temp_passwd',
+ { 'foreign.user_id' => 'self.user_id' });
+
__PACKAGE__->has_many( opr_group_user => 'OTRS::OPR::DB::Schema::Result::opr_group_user',
{ 'foreign.user_id' => 'self.user_id' });

0 comments on commit 8884c16

Please sign in to comment.