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

(-)a/api/v1/swagger/definitions/booking.yaml (-4 / +4 lines)
Lines 18-29 properties: Link Here
18
    description: Internal item identifier
18
    description: Internal item identifier
19
    type:
19
    type:
20
      - integer
20
      - integer
21
      - "null"
21
      - 'null'
22
  item:
22
  item:
23
    description: Embedable item representation
23
    description: Embedable item representation
24
    type:
24
    type:
25
      - object
25
      - object
26
      - "null"
26
      - 'null'
27
  patron_id:
27
  patron_id:
28
    description: Internal patron identifier
28
    description: Internal patron identifier
29
    type: integer
29
    type: integer
Lines 31-37 properties: Link Here
31
    description: Embedable patron representation
31
    description: Embedable patron representation
32
    type:
32
    type:
33
      - object
33
      - object
34
      - "null"
34
      - 'null'
35
  pickup_library_id:
35
  pickup_library_id:
36
    description: Internal pickup_library identifier
36
    description: Internal pickup_library identifier
37
    type: string
37
    type: string
Lines 39-45 properties: Link Here
39
    description: Embedable pickup_library representation
39
    description: Embedable pickup_library representation
40
    type:
40
    type:
41
      - object
41
      - object
42
      - "null"
42
      - 'null'
43
  start_date:
43
  start_date:
44
    description: Start date and time of this booking
44
    description: Start date and time of this booking
45
    format: date-time
45
    format: date-time
(-)a/installer/data/mysql/atomicupdate/bug_36120.pl (+9 lines)
Lines 19-24 return { Link Here
19
          $dbh->do(
19
          $dbh->do(
20
              q{UPDATE bookings JOIN items ON bookings.item_id = items.itemnumber SET bookings.pickup_library_id = items.homebranch }
20
              q{UPDATE bookings JOIN items ON bookings.item_id = items.itemnumber SET bookings.pickup_library_id = items.homebranch }
21
          );
21
          );
22
23
          say $out "Set existing bookings pickup location to item homebranch";
24
25
          $dbh->do(q{
26
              ALTER TABLE bookings
27
              MODIFY pickup_library_id varchar(10) NOT NULL COMMENT 'Identifier for booking pickup library'
28
          });
29
30
          say $out "Set pickup_library_id to NOT NULL";
22
        }
31
        }
23
    },
32
    },
24
};
33
};
(-)a/installer/data/mysql/kohastructure.sql (-2 / +1 lines)
Lines 1208-1214 CREATE TABLE `bookings` ( Link Here
1208
  `patron_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this booking is for',
1208
  `patron_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this booking is for',
1209
  `biblio_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this booking is on',
1209
  `biblio_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this booking is on',
1210
  `item_id` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed a booking for',
1210
  `item_id` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed a booking for',
1211
  `pickup_library_id` varchar(10) DEFAULT NULL COMMENT 'Identifier for booking pickup library',
1211
  `pickup_library_id` varchar(10) NOT NULL COMMENT 'Identifier for booking pickup library',
1212
  `start_date` datetime DEFAULT NULL COMMENT 'the start date of the booking',
1212
  `start_date` datetime DEFAULT NULL COMMENT 'the start date of the booking',
1213
  `end_date` datetime DEFAULT NULL COMMENT 'the end date of the booking',
1213
  `end_date` datetime DEFAULT NULL COMMENT 'the end date of the booking',
1214
  PRIMARY KEY (`booking_id`),
1214
  PRIMARY KEY (`booking_id`),
1215
- 

Return to bug 36120