I create a Vapor server without using toolbox.
It's running very well.
I also read the migrate session of Fluent.
To run migrations, call vapor run migrate from the command line or add migrate as an argument to Xcode's Run scheme.
what does this mean add migrate as an argument to Xcode's Run scheme?
But, migration looks like nothing happen and my psql also.
Could you give me some advice?
thanks
final class User: Model {
struct FieldKeys {
static var name: FieldKey { "name" }
static var email: FieldKey { "email" }
static var password: FieldKey { "password" }
}
public static let schema = "users"
@ID(key: .id) public var id: UUID?
@Field(key: FieldKeys.name) public var name: String
@Field(key: FieldKeys.email) public var email: String
@Field(key: FieldKeys.password) public var password: String
public init() {}
public init(id: User.IDValue? = nil, name: String, email: String, password: String) {
self.id = id
self.name = name
self.email = email
self.password = password
}
}
macOS 10.15.4 Vapor 4.0.3
I create a Vapor server without using toolbox. It's running very well.
I also read the migrate session of Fluent. To run migrations, call vapor run migrate from the command line or
add migrate as an argument to Xcode's Run scheme
. what does this meanadd migrate as an argument to Xcode's Run scheme
?But, migration looks like nothing happen and my psql also. Could you give me some advice? thanks
Configure function
User Model
User Migration