Schema/AuditLog/Structure/View.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Schema/AuditLog/Structure/User.pm ↑ Summary
1 package DBIx::Class::Schema::AuditLog::Structure::View;
2 12 $DBIx::Class::Schema::AuditLog::Structure::View::VERSION = '0.6.4';
3 12 ▶use base 'DBIx::Class::Schema::AuditLog::Structure::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 12 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 12 __PACKAGE__->table_class('DBIx::Class::ResultSource::View');
9  
10 12 __PACKAGE__->table('audit_log_view');
11  
12 12 __PACKAGE__->result_source_instance->view_definition(
13 q{
14 select
15 c.id as change_id,
16 s.id as changeset_id,
17 c.old_value,
18 c.new_value,
19 a.action_type,
20 a.audited_row,
21 s.description,
22 s.created_on,
23 t.name as table_name,
24 f.name as field_name,
25 u.name as user_name
26 from
27 audit_log_action a
28 inner join
29 audit_log_change c
30 on c.action_id = a.id
31 inner join
32 audit_log_field f
33 on f.id = c.field_id
34 inner join
35 audit_log_table t
36 on t.id = a.audited_table_id
37 inner join
38 audit_log_changeset s
39 on s.id = a.changeset_id
40 left join
41 audit_log_user u
42 on s.user_id = u.id
43 }
44 );
45  
46 12 __PACKAGE__->add_columns(
47 'change_id' => {
48 'data_type' => 'integer',
49 'is_nullable' => 0,
50 },
51 'changeset_id' => {
52 'data_type' => 'integer',
53 'is_nullable' => 0,
54 },
55 'old_value' => {
56 'data_type' => 'varchar',
57 'is_nullable' => 1,
58 'size' => 255,
59 },
60 'new_value' => {
61 'data_type' => 'varchar',
62 'is_nullable' => 1,
63 'size' => 255,
64 },
65 'action_type' => {
66 'data_type' => 'varchar',
67 'is_nullable' => 0,
68 'size' => 10,
69 },
70 'audited_row' => {
71 'data_type' => 'varchar',
72 'is_nullable' => 0,
73 'size' => 255,
74 },
75 'description' => {
76 'data_type' => 'varchar',
77 'is_nullable' => 1,
78 'size' => 255,
79 },
80 'created_on' => {
81 'data_type' => 'timestamp',
82 'set_on_create' => 1,
83 'is_nullable' => 0,
84 },
85 'table_name' => {
86 'data_type' => 'varchar',
87 'is_nullable' => 0,
88 'size' => 40,
89 },
90 'field_name' => {
91 'data_type' => 'varchar',
92 'is_nullable' => 0,
93 'size' => 40,
94 },
95 'user_name' => {
96 'data_type' => "varchar",
97 'is_nullable' => 1,
98 'size' => 100
99 },
100 );
101  
102 12 __PACKAGE__->set_primary_key('change_id');
103  
104 12 1;
105  
106 __END__
« Schema/AuditLog/Structure/User.pm ↑ Summary