Skip to content

Commit

Permalink
Support the models-with-spaces FluentKit work (#208)
Browse files Browse the repository at this point in the history
* Support the models-with-spaces FluentKit work

* Require appropriate FluentKit version
  • Loading branch information
gwynne authored May 11, 2022
1 parent a135fb2 commit dc9765f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let package = Package(
.library(name: "FluentMySQLDriver", targets: ["FluentMySQLDriver"]),
],
dependencies: [
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.6.0"),
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.24.0"),
.package(url: "https://github.com/vapor/mysql-kit.git", from: "4.0.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
],
Expand Down
4 changes: 2 additions & 2 deletions Sources/FluentMySQLDriver/MySQLConverterDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ struct MySQLConverterDelegate: SQLConverterDelegate {
dataType: dataType,
constraints: constraints.filter { constraint in
switch constraint {
case .foreignKey(let schema, let field, let onDelete, let onUpdate):
case .foreignKey(let schema, let space, let field, let onDelete, let onUpdate):
copy.createConstraints.append(.constraint(
.foreignKey([name], schema, [field], onDelete: onDelete, onUpdate: onUpdate),
.foreignKey([name], schema, space: space, [field], onDelete: onDelete, onUpdate: onUpdate),
name: nil
))
return false
Expand Down

0 comments on commit dc9765f

Please sign in to comment.