New:
IndexSupportingprotocol which adds index support.
final class Foo: Model, Migration {
...
static func prepare(on connection: Database.Connection) -> Future<Void> {
return Database.create(self, on: connection) { builder in
try addProperties(to: builder)
builder.addIndex(to: \.email, isUnique: true)
}
}
}SQLiteModelnow enforcesid: Int?, meaning less boilerplate for most models.
struct Foo: SQLiteModel {
var id: Int?
var name: String
}
final class Bar: SQLiteModel {
var id: Int?
var name: String
}- New
SQLiteUUIDModelwhich enforcesid: UUID?, similar toSQLiteModel
Fixed:
- Removed Connection Config in favor of Database-based config.