View | Details | Raw Unified | Return to bug 11390
Collapse All | Expand All

(-)a/Koha/Schema/Result/Accountline.pm (+3 lines)
Lines 153-158 __PACKAGE__->add_columns( Link Here
153
    datetime_undef_if_invalid => 1,
153
    datetime_undef_if_invalid => 1,
154
    default_value => \"current_timestamp",
154
    default_value => \"current_timestamp",
155
    is_nullable => 0,
155
    is_nullable => 0,
156
    extra => {
157
        "on update" => \"current_timestamp",
158
    },
156
  },
159
  },
157
  "notify_id",
160
  "notify_id",
158
  { data_type => "integer", default_value => 0, is_nullable => 0 },
161
  { data_type => "integer", default_value => 0, is_nullable => 0 },
(-)a/installer/dbic_controller.pl (-1 lines)
Lines 5-11 use Data::Dumper; Link Here
5
my $schema = Koha::Database->new()->schema();
5
my $schema = Koha::Database->new()->schema();
6
6
7
7
8
9
$schema->deploy({quote_identifiers => 1,  producer_args => {mysql_version => '5.5.33'}, });
8
$schema->deploy({quote_identifiers => 1,  producer_args => {mysql_version => '5.5.33'}, });
10
#my $statements = $schema->deployment_statements(undef,'2.0',undef,{quote_identifiers => 1,  producer_args => {mysql_version => '5.5.33'},});
9
#my $statements = $schema->deployment_statements(undef,'2.0',undef,{quote_identifiers => 1,  producer_args => {mysql_version => '5.5.33'},});
11
#print Dumper($statements);
10
#print Dumper($statements);
(-)a/misc/devel/update_dbix_class_files.pl (-4 / +25 lines)
Lines 24-29 use DBIx::Class::Schema::Loader qw/ make_schema_at /; Link Here
24
24
25
use Getopt::Long;
25
use Getopt::Long;
26
use Pod::Usage;
26
use Pod::Usage;
27
use Data::Dumper;
27
28
28
my $path = "./";
29
my $path = "./";
29
my $db_driver = 'mysql';
30
my $db_driver = 'mysql';
Lines 53-63 if (! defined $db_name ) { Link Here
53
    pod2usage(1);
54
    pod2usage(1);
54
} else {
55
} else {
55
56
56
    make_schema_at(
57
my $test = make_schema_at(
57
        "Koha::Schema",
58
        "Koha::Schema",
58
        { debug => 1, dump_directory => $path, preserve_case => 1 },
59
        { debug => 1, dump_directory => $path, preserve_case => 1,
60
        skip_load_external => 1,
61
        custom_column_info => sub {
62
            my ($table, $column_name, $column_info) = @_;
63
64
            if ($table eq 'accountlines' && $column_name eq 'timestamp'){
65
                return { extra => { "on update" => \"CURRENT_TIMESTAMP" } };
66
            }
67
        },
68
69
70
 filter_generated_code => sub {
71
        my ($type, $class, $text) = @_;
72
        $text =~ s/(\\"current_timestamp"|\scurrent_timestamp\s)/\U$1\E/g;
73
        $text =~ s/"double precision"/"double"/g;
74
        return $text;
75
    }
76
77
78
         },
59
        ["DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port",$db_user, $db_passwd ]
79
        ["DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port",$db_user, $db_passwd ]
60
    );
80
    );
81
82
61
}
83
}
62
84
63
1;
85
1;
Lines 111-114 path into which create the schema files. (defaults to './') Link Here
111
133
112
prints this help text
134
prints this help text
113
135
114
=back
136
=back
115
- 

Return to bug 11390