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