-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmigrate_missile_rocket.sql
More file actions
24 lines (20 loc) · 953 Bytes
/
Copy pathmigrate_missile_rocket.sql
File metadata and controls
24 lines (20 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- Add 'missile_rocket' as an aircraft_type
--
-- Covers air-to-air missiles, ICBMs, cruise missiles, sounding rockets,
-- launch vehicles — anything that flies, isn't crewed, and doesn't fit
-- the existing fixed_wing / rotary_wing / lighter_than_air / spacecraft
-- categories. Discrimination within the category lives in role_type
-- (ballistic, cruise, air_to_air, launch_vehicle, etc.).
USE airplane_museum_tracker;
-- Both Aircraft and AircraftTemplate tables have the same ENUM and need
-- the same change. Order matters only insofar as both must succeed.
ALTER TABLE aircraft
MODIFY COLUMN aircraft_type
ENUM('fixed_wing', 'rotary_wing', 'lighter_than_air',
'spacecraft', 'missile_rocket')
NOT NULL DEFAULT 'fixed_wing';
ALTER TABLE aircraft_templates
MODIFY COLUMN aircraft_type
ENUM('fixed_wing', 'rotary_wing', 'lighter_than_air',
'spacecraft', 'missile_rocket')
NOT NULL DEFAULT 'fixed_wing';