use strict;
-use base qw(SL::DB::Object);
+use parent qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'project_status',
+__PACKAGE__->meta->table('project_statuses');
- columns => [
- id => { type => 'serial', not_null => 1 },
- name => { type => 'text', not_null => 1 },
- description => { type => 'text', not_null => 1 },
- position => { type => 'integer', not_null => 1 },
- itime => { type => 'timestamp', default => '06.05.2013 14:26:18.81159' },
- mtime => { type => 'timestamp' },
- ],
+__PACKAGE__->meta->columns(
+ description => { type => 'text', not_null => 1 },
+ id => { type => 'integer', not_null => 1, sequence => 'project_status_id_seq' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ name => { type => 'text', not_null => 1 },
+ position => { type => 'integer', not_null => 1 },
+);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- relationships => [
- project => {
- class => 'SL::DB::Project',
- column_map => { id => 'project_status_id' },
- type => 'one to many',
- },
- ],
-);
+__PACKAGE__->meta->allow_inline_column_values(1);
1;
;