init push

This commit is contained in:
2026-07-16 22:16:45 +07:00
commit 8b068bdb10
1021 changed files with 332816 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
-- +goose Up
CREATE TABLE IF NOT EXISTS before_flight_inspections (
id BINARY(16) PRIMARY KEY,
flight_inspection_id BINARY(16) NOT NULL,
oil_engine_nr1_checked TINYINT(1) NULL,
oil_engine_nr2_checked TINYINT(1) NULL,
hydraulic_lh_checked TINYINT(1) NULL,
hydraulic_rh_checked TINYINT(1) NULL,
oil_transmission_mgb_checked TINYINT(1) NULL,
oil_transmission_igb_checked TINYINT(1) NULL,
oil_transmission_tgb_checked TINYINT(1) NULL,
fuel_amount DECIMAL(10,2) NULL,
fuel_unit VARCHAR(10) NULL,
fuel_added_amount DECIMAL(10,2) NULL,
note TEXT NULL,
created_at DATETIME NULL,
created_by BINARY(16) NULL,
updated_at DATETIME NULL,
updated_by BINARY(16) NULL,
CONSTRAINT fk_before_flight_inspections_flight_inspection FOREIGN KEY (flight_inspection_id) REFERENCES flight_inspections(id),
CONSTRAINT chk_before_flight_fuel_unit CHECK (fuel_unit IS NULL OR fuel_unit IN ('LT', 'KG', 'POUND'))
);
CREATE UNIQUE INDEX idx_before_flight_inspections_flight_inspection_id ON before_flight_inspections(flight_inspection_id);
-- +goose Down
DROP TABLE IF EXISTS before_flight_inspections;