X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/f97b07787db5cacc0f90338fdb3c1237262917cb..64b49f6c38c2c5763f21df00c7b4580ff70893be:/SL/DB/MetaSetup/UnitsLanguage.pm diff --git a/SL/DB/MetaSetup/UnitsLanguage.pm b/SL/DB/MetaSetup/UnitsLanguage.pm index cd00dc869..f3c20f52c 100644 --- a/SL/DB/MetaSetup/UnitsLanguage.pm +++ b/SL/DB/MetaSetup/UnitsLanguage.pm @@ -6,31 +6,31 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'units_language', - - columns => [ - unit => { type => 'varchar', length => 20, not_null => 1 }, - language_id => { type => 'integer', not_null => 1 }, - localized => { type => 'varchar', length => 20 }, - localized_plural => { type => 'varchar', length => 20 }, - id => { type => 'serial', not_null => 1 }, - ], - - primary_key_columns => [ 'id' ], - - foreign_keys => [ - language => { - class => 'SL::DB::Language', - key_columns => { language_id => 'id' }, - }, - - unit_obj => { - class => 'SL::DB::Unit', - key_columns => { unit => 'name' }, - }, - ], +__PACKAGE__->meta->table('units_language'); + +__PACKAGE__->meta->columns( + unit => { type => 'varchar', length => 20, not_null => 1 }, + language_id => { type => 'integer', not_null => 1 }, + localized => { type => 'varchar', length => 20 }, + localized_plural => { type => 'varchar', length => 20 }, + id => { type => 'serial', not_null => 1 }, ); +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + +__PACKAGE__->meta->foreign_keys( + language => { + class => 'SL::DB::Language', + key_columns => { language_id => 'id' }, + }, + + unit_obj => { + class => 'SL::DB::Unit', + key_columns => { unit => 'name' }, + }, +); + +# __PACKAGE__->meta->initialize; + 1; ;