init push
This commit is contained in:
36
migrations/20260707_helicopter_usage_totals_to_decimal.sql
Normal file
36
migrations/20260707_helicopter_usage_totals_to_decimal.sql
Normal file
@@ -0,0 +1,36 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
-- Counts (landings, cycles, ccc, flight reports, hook releases, rotor brake cycles) were
|
||||
-- INT; widen the helicopter_usage totals + manual adjustments to DECIMAL(12,2) so manual
|
||||
-- summary edits can carry up to 2 decimals, matching the hours/gpc/ptc columns.
|
||||
ALTER TABLE helicopter_usage
|
||||
MODIFY COLUMN total_landing DECIMAL(12,2) NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN total_airframe_cycles DECIMAL(12,2) NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN total_engine_1_ccc DECIMAL(12,2) NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN total_engine_2_ccc DECIMAL(12,2) NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN total_flight_report DECIMAL(12,2) NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN total_hook_release DECIMAL(12,2) NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN total_rotor_brake_cycle DECIMAL(12,2) NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN manual_airframe_cycles DECIMAL(12,2) NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN manual_landing DECIMAL(12,2) NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN manual_flight_report DECIMAL(12,2) NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN manual_hook_release DECIMAL(12,2) NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN manual_rotor_brake_cycle DECIMAL(12,2) NOT NULL DEFAULT 0;
|
||||
-- +goose StatementEnd
|
||||
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
ALTER TABLE helicopter_usage
|
||||
MODIFY COLUMN total_landing INT NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN total_airframe_cycles INT NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN total_engine_1_ccc INT NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN total_engine_2_ccc INT NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN total_flight_report INT NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN total_hook_release INT NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN total_rotor_brake_cycle INT NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN manual_airframe_cycles INT NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN manual_landing INT NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN manual_flight_report INT NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN manual_hook_release INT NOT NULL DEFAULT 0,
|
||||
MODIFY COLUMN manual_rotor_brake_cycle INT NOT NULL DEFAULT 0;
|
||||
-- +goose StatementEnd
|
||||
Reference in New Issue
Block a user