Spaltentyp Text anstelle von varchar() in diversen Tabellen Teil 2
[kivitendo-erp.git] / SL / DB / MetaSetup / Currency.pm
index 705467f..5d7d613 100644 (file)
@@ -6,18 +6,16 @@ use strict;
 
 use base qw(SL::DB::Object);
 
-__PACKAGE__->meta->setup(
-  table   => 'currencies',
+__PACKAGE__->meta->table('currencies');
 
-  columns => [
-    id   => { type => 'serial', not_null => 1 },
-    name => { type => 'text', not_null => 1 },
-  ],
+__PACKAGE__->meta->columns(
+  id   => { type => 'serial', not_null => 1 },
+  name => { type => 'text', not_null => 1 },
+);
 
-  primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-  unique_key => [ 'name' ],
-);
+__PACKAGE__->meta->unique_keys([ 'name' ]);
 
 1;
 ;