import Fluent import SQLKit struct CreateVersionsCreatedAtIndex: AsyncMigration { func prepare(on database: Database) async throws { try await (database as! SQLDatabase) .create(index: "versions_created_at_index") // Index name .on("versions") // Table name .column("created_at") // You can also add more columns here if you want a multi-column index... .run() } func revert(on database: Database) async throws { try await (database as! SQLDatabase) .drop(index: "versions_created_at_index") .run() } }