awa
This commit is contained in:
8
dns/cleanup_migration.sql
Normal file
8
dns/cleanup_migration.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- 清理部分应用的迁移记录
|
||||
DELETE FROM _sqlx_migrations WHERE version = 1;
|
||||
|
||||
-- 可选:也可以删除所有迁移记录,从头开始
|
||||
-- TRUNCATE TABLE _sqlx_migrations;
|
||||
|
||||
-- 显示清理后的迁移表状态
|
||||
SELECT * FROM _sqlx_migrations;
|
||||
@@ -3,5 +3,6 @@
|
||||
-- MySQL 8.0+ supports CHECK constraints, but we'll skip adding for compatibility
|
||||
|
||||
-- Add indexes for efficient DNS lookups if they don't exist
|
||||
CREATE INDEX idx_dns_records_ns_lookup ON dns_records(record_type, name);
|
||||
-- Index already created in migration 003_add_ns_records.sql
|
||||
-- CREATE INDEX idx_dns_records_ns_lookup ON dns_records(record_type, name);
|
||||
CREATE INDEX idx_dns_records_subdomain_lookup ON dns_records(domain_id, name, record_type);
|
||||
Reference in New Issue
Block a user