7.2.0: Merge pull request #288 from orlandos-nl/jw-upsert-success-check-fix-7.0
additions:
- The
.buildIndexes
method - Adds typesafe indexes to Meow
Typesafe indexes allow for fully typesafe migrations such as:
try await meow.migrate("Unique Email", on: User.self) { migrator in
migrator.add { users in
try await users.buildIndexes { user in
UniqueIndex(named: "unique-email", field: user.$email)
}
}
}
fixes:
- Small fix for upserting returning a failed result when adding a new entry to the database. This resulted in migrations throwing an error (even though the migration itself might have succeeded) when running migrations on an empty database.