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,22 @@
-- +goose Up
ALTER TABLE lands
ADD UNIQUE KEY uq_lands_land_iso_code (land_iso_code);
-- +goose Down
SET @idx_exists := (
SELECT COUNT(1)
FROM information_schema.statistics
WHERE table_schema = DATABASE()
AND table_name = 'lands'
AND index_name = 'uq_lands_land_iso_code'
);
SET @drop_sql := IF(
@idx_exists > 0,
'ALTER TABLE lands DROP INDEX uq_lands_land_iso_code',
'SELECT 1'
);
PREPARE stmt FROM @drop_sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;