Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Changed foreign key generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Casperhr authored Jan 10, 2017
1 parent 821a718 commit c3e4f93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/AdminPanel/Models/BackendUsers/BackendUser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public final class BackendUser: Auth.User, Model {
table.timestamps()
}

try database.foreign(parentTable: "backend_user_roles", parentPrimaryKey: "slug", childTable: "backend_users", childForeignKey: "role")
try database.driver.raw(Database.foreign(parentTable: "backend_user_roles", parentPrimaryKey: "slug", childTable: "backend_users", childForeignKey: "role"))
try database.index(table: "backend_users", column: "email")
}

Expand Down

0 comments on commit c3e4f93

Please sign in to comment.