Skip to content

Commit

Permalink
Merge pull request #4 from SwifQL/replace-name-with-migrationName
Browse files Browse the repository at this point in the history
AnyMigration: add alias to `name`
  • Loading branch information
MihaelIsaev committed May 6, 2020
2 parents fc15c7b + 25c1b75 commit b971684
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/Bridges/Protocols/AnyMigration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
import NIO

public protocol AnyMigration {
static var name: String { get }
static var migrationName: String { get }

static func prepare(on conn: BridgeConnection) -> EventLoopFuture<Void>
static func revert(on conn: BridgeConnection) -> EventLoopFuture<Void>
}

extension AnyMigration {
public static var migrationName: String { String(describing: Self.self) }
public static var name: String { String(describing: Self.self) }
public static var migrationName: String { name }
}

0 comments on commit b971684

Please sign in to comment.