11 lines
355 B
SQL
11 lines
355 B
SQL
ALTER TABLE duty_rosters
|
|
ADD COLUMN flight_id BINARY(16) NULL AFTER id;
|
|
|
|
CREATE UNIQUE INDEX idx_roster_flight_id
|
|
ON duty_rosters (flight_id);
|
|
|
|
-- Keep base/date as a non-unique lookup index so existing roster views still work.
|
|
DROP INDEX idx_roster_base_date ON duty_rosters;
|
|
CREATE INDEX idx_roster_base_date
|
|
ON duty_rosters (base_id, duty_date);
|