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,26 @@
-- Add optional name field to ICAO table.
SET @has_table := (
SELECT COUNT(*)
FROM information_schema.tables
WHERE table_schema = DATABASE()
AND table_name = 'icaos'
);
SET @has_column := (
SELECT COUNT(*)
FROM information_schema.columns
WHERE table_schema = DATABASE()
AND table_name = 'icaos'
AND column_name = 'name'
);
SET @sql := IF(
@has_table > 0 AND @has_column = 0,
'ALTER TABLE icaos ADD COLUMN name VARCHAR(128) NULL AFTER icao_code',
'SELECT 1'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;