feat: Fixes 'any' not being used in some function calls.

This commit is contained in:
2025-01-13 16:54:28 -05:00
parent b38dc0d4e3
commit 6225c32007
8 changed files with 17 additions and 14 deletions

View File

@@ -82,7 +82,7 @@ extension Employee {
let name = "CreateEmployee"
func prepare(on database: Database) async throws {
func prepare(on database: any Database) async throws {
try await database.schema(EmployeeModel.schema)
.id()
.field("first_name", .string, .required)
@@ -94,7 +94,7 @@ extension Employee {
.create()
}
func revert(on database: Database) async throws {
func revert(on database: any Database) async throws {
try await database.schema(EmployeeModel.schema).delete()
}

View File

@@ -55,7 +55,7 @@ extension VendorBranch {
struct Migrate: AsyncMigration {
let name = "CreateVendorBranch"
func prepare(on database: Database) async throws {
func prepare(on database: any Database) async throws {
try await database.schema(VendorBranchModel.schema)
.id()
.field("name", .string, .required)
@@ -66,7 +66,7 @@ extension VendorBranch {
.create()
}
func revert(on database: Database) async throws {
func revert(on database: any Database) async throws {
try await database.schema(VendorBranchModel.schema).delete()
}
}

View File

@@ -52,7 +52,7 @@ extension Vendor {
struct Migrate: AsyncMigration {
let name = "CreateVendor"
func prepare(on database: Database) async throws {
func prepare(on database: any Database) async throws {
try await database.schema(VendorModel.schema)
.id()
.field("name", .string, .required)
@@ -62,7 +62,7 @@ extension Vendor {
.create()
}
func revert(on database: Database) async throws {
func revert(on database: any Database) async throws {
try await database.schema(VendorModel.schema).delete()
}
}