Hi have some difficulty to find the source of the problem. Here is what I did and tried :
- I jumped chapter 18 and 19, so my database is in the state that it should be at the end of the chapter 17
- When I do a
vapor run revert --all --yes
in the terminal, I gotError: No builds found for debug configuration.
- When I try to compile, I have the following Xcode output :
[ INFO ] Migrating ‘psql’ database (/Users/nicolas/pCloud Sync/Librairie/Electronique/iOS/Server_Side_Swift_with_Vapor_v2.1/20-cookies-sessions/starter/TILApp/.build/checkouts/fluent/Sources/Fluent/Migration/MigrationConfig.swift:69)
[ INFO ] Preparing migration ‘AdminUser’ (/Users/nicolas/pCloud Sync/Librairie/Electronique/iOS/Server_Side_Swift_with_Vapor_v2.1/20-cookies-sessions/starter/TILApp/.build/checkouts/fluent/Sources/Fluent/Migration/Migrations.swift:111)
Fatal error: Error raised at top level: PostgreSQL Error: column “password” of relation “User” does not exist
- id: PostgreSQLError.server.error.checkInsertTargets
: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1001.8.63.13/swift/stdlib/public/core/ErrorType.swift, line 200
2019-09-29 20:32:23.206764-0400 Run[61567:3125033] Fatal error: Error raised at top level: PostgreSQL Error: column “password” of relation “User” does not exist
- id: PostgreSQLError.server.error.checkInsertTargets
: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1001.8.63.13/swift/stdlib/public/core/ErrorType.swift, line 200
Program ended with exit code: 9
This is the order of migrations :
migrations.add(model: User. self , database: .psql)
migrations.add(model: Acronym. self , database: .psql)
migrations.add(model: Category. self , database: .psql)
migrations.add(model: AcronymCategoryPivot. self , database: .psql)
migrations.add(model: Token. self , database: .psql)
migrations.add(migration: AdminUser. self , database: .psql)
What am I doing wrong ?