Skip to content

7.2.0: Merge pull request #288 from orlandos-nl/jw-upsert-success-check-fix-7.0

Compare
Choose a tag to compare
@JaapWijnen JaapWijnen released this 08 Aug 14:16
· 147 commits to master/7.0 since this release
5641e17

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.