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,33 @@
-- +goose Up
SET @has_col := (
SELECT COUNT(*)
FROM information_schema.columns
WHERE table_schema = DATABASE()
AND table_name = 'flight_data'
AND column_name = 'flight_position'
);
SET @sql := IF(
@has_col = 0,
'ALTER TABLE flight_data ADD COLUMN flight_position TINYINT(1) NOT NULL DEFAULT 0 AFTER fuel_planning',
'SELECT 1'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
-- +goose Down
SET @has_col := (
SELECT COUNT(*)
FROM information_schema.columns
WHERE table_schema = DATABASE()
AND table_name = 'flight_data'
AND column_name = 'flight_position'
);
SET @sql := IF(
@has_col = 1,
'ALTER TABLE flight_data DROP COLUMN flight_position',
'SELECT 1'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;