Skip to content

Commit

Permalink
Merge branch 'release' of github.com:vapor/fluent into release
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner0101 committed Jul 17, 2018
2 parents 86a14b9 + aec0a83 commit 305e638
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/Fluent/Migration/AnyMigration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ public protocol AnyMigration {
extension AnyMigration where Self: Migration {
/// See `Migration`.
public static var migrationName: String {
let _type = "\(type(of: self))"
return _type.components(separatedBy: ".Type").first ?? _type
return String(reflecting: self)
.components(separatedBy: ".")
.dropFirst()
.joined(separator: ".")
}

/// See `Migration`.
Expand Down

0 comments on commit 305e638

Please sign in to comment.