From f0a6e8a5ca57855f7ea372af3ee40e48ab0f85b0 Mon Sep 17 00:00:00 2001 From: Holly Schilling Date: Fri, 13 Jun 2025 09:56:37 -0500 Subject: [PATCH] Added `any` to Database protocol in Example code in Spanish --- docs/fluent/migration.es.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/fluent/migration.es.md b/docs/fluent/migration.es.md index 37f213ab..6ae72794 100644 --- a/docs/fluent/migration.es.md +++ b/docs/fluent/migration.es.md @@ -5,11 +5,11 @@ Las migraciones son una especie de control de versiones para tu base de datos. C ```swift // Una migración de ejemplo. struct MyMigration: Migration { - func prepare(on database: Database) -> EventLoopFuture { + func prepare(on database: any Database) -> EventLoopFuture { // Haz un cambio en la base de datos. } - func revert(on database: Database) -> EventLoopFuture { + func revert(on database: any Database) -> EventLoopFuture { // Deshaz el cambio hecho en `prepare`, si es posible. } } @@ -19,11 +19,11 @@ Si estás usando `async`/`await` deberías implementar el protocolo `AsyncMigrat ```swift struct MyMigration: AsyncMigration { - func prepare(on database: Database) async throws { + func prepare(on database: any Database) async throws { // Haz un cambio en la base de datos. } - func revert(on database: Database) async throws { + func revert(on database: any Database) async throws { // Deshaz el cambio hecho en `prepare`, si es posible. } }