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

(-)a/misc/maintenance/fix_mysql_constraints.pl (-8 / +5 lines)
Lines 22-28 BEGIN { Link Here
22
    # find Koha's Perl modules
22
    # find Koha's Perl modules
23
    # test carefully before changing this
23
    # test carefully before changing this
24
    use FindBin;
24
    use FindBin;
25
    eval { require "$FindBin::Bin/../kohalib.pl" };
25
    my $lib = "$FindBin::Bin/../kohalib.pl";
26
    eval { require $lib };
26
}
27
}
27
28
28
use Getopt::Long;
29
use Getopt::Long;
Lines 61-71 sub fix_mysql_constraints { Link Here
61
            AND CONSTRAINT_TYPE != 'PRIMARY KEY' ")};
62
            AND CONSTRAINT_TYPE != 'PRIMARY KEY' ")};
62
63
63
    my $base_dir = C4::Context->config('intranetdir');
64
    my $base_dir = C4::Context->config('intranetdir');
64
    open my $fh, "<", "$base_dir/installer/data/mysql/kohastructure.sql";
65
    open my $fh, "<", "$base_dir/installer/data/mysql/kohastructure.sql"
65
    unless ($fh) {
66
        or die "Unable to open kohastructure.sql file";
66
        say "Unable to open kohastructure.sql file";
67
        exit;
68
    }
69
67
70
    my $table_name;
68
    my $table_name;
71
    my $engine_altered;
69
    my $engine_altered;
Lines 159-165 Prints this help Link Here
159
157
160
Alter tables effectively, otherwise just display the ALTER TABLE directives.
158
Alter tables effectively, otherwise just display the ALTER TABLE directives.
161
159
162
=item B<--alterengine
160
=item B<--alterengine>
163
161
164
Prior to add missing constraints, alter table engine to InnoDB.
162
Prior to add missing constraints, alter table engine to InnoDB.
165
163
166
- 

Return to bug 8915