X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/0b2ca0abb53db0d372bcc51e8093abb30f2aeea6..e214accccd89a9c8:/SL/DB/MetaSetup/AuthUserGroup.pm diff --git a/SL/DB/MetaSetup/AuthUserGroup.pm b/SL/DB/MetaSetup/AuthUserGroup.pm index f185014a9..6b470cf6c 100644 --- a/SL/DB/MetaSetup/AuthUserGroup.pm +++ b/SL/DB/MetaSetup/AuthUserGroup.pm @@ -6,16 +6,29 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'user_group', +__PACKAGE__->meta->table('user_group'); +__PACKAGE__->meta->schema('auth'); - columns => [ - user_id => { type => 'integer', not_null => 1 }, - group_id => { type => 'integer', not_null => 1 }, - ], +__PACKAGE__->meta->columns( + user_id => { type => 'integer', not_null => 1 }, + group_id => { type => 'integer', not_null => 1 }, +); + +__PACKAGE__->meta->primary_key_columns([ 'user_id', 'group_id' ]); - primary_key_columns => [ 'user_id', 'group_id' ], +__PACKAGE__->meta->foreign_keys( + group => { + class => 'SL::DB::AuthGroup', + key_columns => { group_id => 'id' }, + }, + + user => { + class => 'SL::DB::AuthUser', + key_columns => { user_id => 'id' }, + }, ); +# __PACKAGE__->meta->initialize; + 1; ;