]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/MetaSetup/AuthClient.pm
rose_auto_create_model.pl: --all behandelt auch auth-Tabellen
[mfinanz.git] / SL / DB / MetaSetup / AuthClient.pm
index 1b0a81a54a885e2c25ce706de1501bddbc5ed43d..5e9d59e04bd94d120c8bb5f0bd53945ef54d8a3a 100644 (file)
@@ -4,28 +4,27 @@ package SL::DB::AuthClient;
 
 use strict;
 
-use base qw(SL::DB::Object);
+use parent qw(SL::DB::Object);
 
-__PACKAGE__->meta->setup(
-  table   => 'clients',
+__PACKAGE__->meta->table('clients');
+__PACKAGE__->meta->schema('auth');
 
-  columns => [
-    id         => { type => 'serial', not_null => 1 },
-    name       => { type => 'text', not_null => 1 },
-    dbhost     => { type => 'text', not_null => 1 },
-    dbport     => { type => 'integer', default => 5432, not_null => 1 },
-    dbname     => { type => 'text', not_null => 1 },
-    dbuser     => { type => 'text', not_null => 1 },
-    dbpasswd   => { type => 'text', not_null => 1 },
-    is_default => { type => 'boolean', default => 'false', not_null => 1 },
-  ],
+__PACKAGE__->meta->columns(
+  dbhost     => { type => 'text', not_null => 1 },
+  dbname     => { type => 'text', not_null => 1 },
+  dbpasswd   => { type => 'text', not_null => 1 },
+  dbport     => { type => 'integer', default => 5432, not_null => 1 },
+  dbuser     => { type => 'text', not_null => 1 },
+  id         => { type => 'serial', not_null => 1 },
+  is_default => { type => 'boolean', default => 'false', not_null => 1 },
+  name       => { type => 'text', not_null => 1 },
+);
 
-  primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-  unique_keys => [
-    [ 'dbhost', 'dbport', 'dbname' ],
-    [ 'name' ],
-  ],
+__PACKAGE__->meta->unique_keys(
+  [ 'dbhost', 'dbport', 'dbname' ],
+  [ 'name' ],
 );
 
 1;