File Coverage

blib/lib/RapidApp/CoreSchema/Result/DeployInfo.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 24 24 100.0


line stmt bran cond sub pod time code
1             package RapidApp::CoreSchema::Result::DeployInfo;
2              
3 1     1   645 use strict;
  1         2  
  1         27  
4 1     1   4 use warnings;
  1         1  
  1         27  
5              
6 1     1   4 use Moose;
  1         3  
  1         6  
7 1     1   5752 use MooseX::NonMoose;
  1         2  
  1         8  
8 1     1   4619 use namespace::autoclean;
  1         2  
  1         12  
9             extends 'DBIx::Class::Core';
10              
11             __PACKAGE__->table("deploy_info");
12              
13             __PACKAGE__->add_columns(
14             md5 => {
15             data_type => "char",
16             is_nullable => 0,
17             size => 32
18             },
19             schema_class => {
20             data_type => "varchar",
21             is_nullable => 0,
22             size => 128
23             },
24             schema_version => {
25             data_type => "varchar",
26             is_nullable => 0,
27             size => 16
28             },
29             comment => {
30             data_type => "varchar",
31             is_nullable => 0,
32             size => 255
33             },
34             deployed_ddl => {
35             data_type => 'mediumtext',
36             is_nullable => 0
37             },
38             deployed_ts => {
39             data_type => "datetime",
40             datetime_undef_if_invalid => 1,
41             is_nullable => 0
42             },
43             );
44             __PACKAGE__->set_primary_key("md5");
45              
46              
47             __PACKAGE__->load_components('+RapidApp::DBIC::Component::TableSpec');
48             __PACKAGE__->apply_TableSpec;
49              
50             # quick set all columns
51 1     1   148 use Clone qw(clone);
  1         3  
  1         132  
52             my $col_props = { map { $_ => clone({
53             allow_add => \0, allow_edit => \0
54             }) } __PACKAGE__->columns };
55             $col_props->{deployed_ddl}->{hidden} = \1;
56              
57             __PACKAGE__->TableSpec_set_conf(
58             title => 'Deploy Info',
59             title_multi => 'Deploy Info',
60             #iconCls => 'ra-icon-data-view',
61             #multiIconCls => 'ra-icon-data-views',
62             display_column => 'md5',
63             columns => $col_props
64             );
65              
66              
67              
68             # You can replace this text with custom content, and it will be preserved on regeneration
69             __PACKAGE__->meta->make_immutable;
70             1;