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

(-)a/installer/data/mysql/db_revs/230600061.pl (-12 / +10 lines)
Lines 6-11 return { Link Here
6
    up          => sub {
6
    up          => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
9
        # Handle cases of roombookings plugin existing
10
        # Handle cases of roombookings plugin existing
10
        if ( TableExists('bookings') ) {
11
        if ( TableExists('bookings') ) {
11
            if ( column_exists( 'bookings', 'bookingid' ) ) {
12
            if ( column_exists( 'bookings', 'bookingid' ) ) {
Lines 37-57 return { Link Here
37
                $old_roomequipment_table TO $roomequipment_table,
38
                $old_roomequipment_table TO $roomequipment_table,
38
            }
39
            }
39
                );
40
                );
41
                $dbh->do("ALTER TABLE $rooms_table RENAME INDEX $old_rooms_index TO $rooms_index");
42
                $dbh->do("ALTER TABLE $bookings_table RENAME INDEX $old_bookings_index TO $bookings_index");
43
                $dbh->do("ALTER TABLE $equipment_table RENAME INDEX $old_equipment_index TO $equipment_index");
40
                $dbh->do(
44
                $dbh->do(
41
"ALTER TABLE $rooms_table RENAME INDEX $old_rooms_index TO $rooms_index"
45
                    "ALTER TABLE $roomequipment_table RENAME INDEX $old_roomequipment_index TO $roomequipment_index");
42
                );
43
                $dbh->do(
44
"ALTER TABLE $bookings_table RENAME INDEX $old_bookings_index TO $bookings_index"
45
                );
46
                $dbh->do(
47
"ALTER TABLE $equipment_table RENAME INDEX $old_equipment_index TO $equipment_index"
48
                );
49
                $dbh->do(
50
"ALTER TABLE $roomequipment_table RENAME INDEX $old_roomequipment_index TO $roomequipment_index"
51
                );
52
46
53
                say "Migrated room reservations plugin to it's own namespace";
47
                say "Migrated room reservations plugin to it's own namespace";
54
                say "You MUST upgrade to the latest room reservation plugin to continue using it";
48
                say "You MUST upgrade to the latest room reservation plugin to continue using it";
49
                $dbh->do(
50
                    "UPDATE plugin_data SET plugin_value = 0 WHERE plugin_class = 'Koha::Plugin::Com::MarywoodUniversity::RoomReservations' AND plugin_key = '__ENABLED__'"
51
                );
52
53
                say "Plugin disabled, please re-enable once you have upgraded it";
55
            }
54
            }
56
        }
55
        }
57
56
58
- 

Return to bug 35473