|
Lines 9-15
return {
Link Here
|
| 9 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
9 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
| 10 |
|
10 |
|
| 11 |
if ( index_exists( 'items_last_borrower', 'itemnumber' ) ) { |
11 |
if ( index_exists( 'items_last_borrower', 'itemnumber' ) ) { |
| 12 |
$dbh->do('SET FOREIGN_KEY_CHECKS=0'); |
|
|
| 13 |
|
12 |
|
| 14 |
# Drop the unique index |
13 |
# Drop the unique index |
| 15 |
$dbh->do( |
14 |
$dbh->do( |
|
Lines 17-24
return {
Link Here
|
| 17 |
ALTER TABLE items_last_borrower DROP INDEX itemnumber |
16 |
ALTER TABLE items_last_borrower DROP INDEX itemnumber |
| 18 |
} |
17 |
} |
| 19 |
); |
18 |
); |
| 20 |
$dbh->do('SET FOREIGN_KEY_CHECKS=1'); |
|
|
| 21 |
|
| 22 |
say_success( $out, "Adjusted foreign key constraints on items_last_borrower table" ); |
19 |
say_success( $out, "Adjusted foreign key constraints on items_last_borrower table" ); |
| 23 |
} |
20 |
} |
| 24 |
|
21 |
|
| 25 |
- |
|
|