MetaSetup neu generiert
[kivitendo-erp.git] / SL / DB / MetaSetup / Price.pm
index bb6f0fd..2fec15f 100644 (file)
@@ -6,30 +6,30 @@ use strict;
 
 use base qw(SL::DB::Object);
 
-__PACKAGE__->meta->setup(
-  table   => 'prices',
-
-  columns => [
-    parts_id      => { type => 'integer' },
-    pricegroup_id => { type => 'integer' },
-    price         => { type => 'numeric', precision => 5, scale => 15 },
-    id            => { type => 'serial', not_null => 1 },
-  ],
-
-  primary_key_columns => [ 'id' ],
-
-  foreign_keys => [
-    parts => {
-      class       => 'SL::DB::Part',
-      key_columns => { parts_id => 'id' },
-    },
-
-    pricegroup => {
-      class       => 'SL::DB::Pricegroup',
-      key_columns => { pricegroup_id => 'id' },
-    },
-  ],
+__PACKAGE__->meta->table('prices');
+
+__PACKAGE__->meta->columns(
+  parts_id      => { type => 'integer' },
+  pricegroup_id => { type => 'integer' },
+  price         => { type => 'numeric', precision => 5, scale => 15 },
+  id            => { type => 'serial', not_null => 1 },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+  parts => {
+    class       => 'SL::DB::Part',
+    key_columns => { parts_id => 'id' },
+  },
+
+  pricegroup => {
+    class       => 'SL::DB::Pricegroup',
+    key_columns => { pricegroup_id => 'id' },
+  },
 );
 
+# __PACKAGE__->meta->initialize;
+
 1;
 ;