· 5 years ago · Aug 13, 2020, 03:40 PM
1[ DEBUG ] No available connections on this event loop, creating a new one [database-id: psql] (AsyncKit/ConnectionPool/EventLoopConnectionPool.swift:202)
2[ DEBUG ] CREATE TABLE IF NOT EXISTS "_fluent_migrations"("id" UUID PRIMARY KEY, "name" TEXT NOT NULL, "batch" BIGINT NOT NULL, "created_at" TIMESTAMPTZ, "updated_at" TIMESTAMPTZ, CONSTRAINT "uq:_fluent_migrations.name" UNIQUE ("name")) [] [database-id: psql] (PostgresNIO/PostgresDatabase+Query.swift:124)
3[ NOTICE ] relation "_fluent_migrations" already exists, skipping (transformCreateStmt)
4[ DEBUG ] Checking for pre-release migration names. [database-id: psql] (FluentKit/Migration/Migrator.swift:193)
5[ DEBUG ] query aggregate(count(_fluent_migrations[id])) _fluent_migrations filters=[_fluent_migrations[name] ~~ ["CreateUsers", "CreateAvatars", "CreateRegex", "CreateAddresses"]] [database-id: psql] (FluentKit/Query/Builder/QueryBuilder.swift:277)
6[ DEBUG ] SELECT COUNT("_fluent_migrations"."id") AS "aggregate" FROM "_fluent_migrations" WHERE "_fluent_migrations"."name" IN ($1 , $2 , $3 , $4) ["CreateUsers", "CreateAvatars", "CreateRegex", "CreateAddresses"] [database-id: psql] (PostgresNIO/PostgresDatabase+Query.swift:124)
7[ DEBUG ] query read _fluent_migrations [database-id: psql] (FluentKit/Query/Builder/QueryBuilder.swift:277)
8[ DEBUG ] No available connections on this event loop, creating a new one [database-id: psql] (AsyncKit/ConnectionPool/EventLoopConnectionPool.swift:202)
9[ DEBUG ] SELECT "_fluent_migrations"."id" AS "_fluent_migrations_id", "_fluent_migrations"."name" AS "_fluent_migrations_name", "_fluent_migrations"."batch" AS "_fluent_migrations_batch", "_fluent_migrations"."created_at" AS "_fluent_migrations_created_at", "_fluent_migrations"."updated_at" AS "_fluent_migrations_updated_at" FROM "_fluent_migrations" [] [database-id: psql] (PostgresNIO/PostgresDatabase+Query.swift:124)
10[ DEBUG ] query read _fluent_migrations limits=[count(1)] [database-id: psql] (FluentKit/Query/Builder/QueryBuilder.swift:277)
11[ DEBUG ] SELECT "_fluent_migrations"."id" AS "_fluent_migrations_id", "_fluent_migrations"."name" AS "_fluent_migrations_name", "_fluent_migrations"."batch" AS "_fluent_migrations_batch", "_fluent_migrations"."created_at" AS "_fluent_migrations_created_at", "_fluent_migrations"."updated_at" AS "_fluent_migrations_updated_at" FROM "_fluent_migrations" ORDER BY "_fluent_migrations"."batch" DESC LIMIT 1 [] [database-id: psql] (PostgresNIO/PostgresDatabase+Query.swift:124)
12[ DEBUG ] query aggregate(count(_fluent_enums[id])) _fluent_enums [database-id: psql] (FluentKit/Query/Builder/QueryBuilder.swift:277)
13[ DEBUG ] SELECT COUNT("_fluent_enums"."id") AS "aggregate" FROM "_fluent_enums" [] [database-id: psql] (PostgresNIO/PostgresDatabase+Query.swift:124)
14[ DEBUG ] query create _fluent_enums input=[[case: "usernameRegex", name: "regexName", id: 0B22E276-9912-4A90-979F-3C4891FDD99B], [name: "regexName", id: 986E553B-B497-4A00-9B04-DA4F396483F4, case: "passwordRegex"], [case: "emailRegex", name: "regexName", id: 843791A0-7754-47E1-BF02-278BD03318B8]] [database-id: psql] (FluentKit/Query/Builder/QueryBuilder.swift:277)
15[ DEBUG ] Connection pool exhausted on this event loop, adding request to waitlist [database-id: psql] (AsyncKit/ConnectionPool/EventLoopConnectionPool.swift:207)
16[ DEBUG ] query delete _fluent_enums filters=[_fluent_enums[name] = "regexName", _fluent_enums[case] ~~ []] [database-id: psql] (FluentKit/Query/Builder/QueryBuilder.swift:277)
17[ DEBUG ] Connection pool exhausted on this event loop, adding request to waitlist [database-id: psql] (AsyncKit/ConnectionPool/EventLoopConnectionPool.swift:207)
18[ DEBUG ] Fulfilling connection waitlist request [database-id: psql] (AsyncKit/ConnectionPool/EventLoopConnectionPool.swift:276)
19[ DEBUG ] INSERT INTO "_fluent_enums" ("case", "name", "id") VALUES ($1, $2, $3), ($4, $5, $6), ($7, $8, $9) RETURNING "id" ["usernameRegex", "regexName", 0B22E276-9912-4A90-979F-3C4891FDD99B, "passwordRegex", "regexName", 986E553B-B497-4A00-9B04-DA4F396483F4, "emailRegex", "regexName", 843791A0-7754-47E1-BF02-278BD03318B8] [database-id: psql] (PostgresNIO/PostgresDatabase+Query.swift:124)
20[ ERROR ] duplicate key value violates unique constraint "uq:_fluent_enums.name+_fluent_enums.case" (_bt_check_unique)
21[ DEBUG ] Fulfilling connection waitlist request [database-id: psql] (AsyncKit/ConnectionPool/EventLoopConnectionPool.swift:276)
22[ DEBUG ] DELETE FROM "_fluent_enums" WHERE "_fluent_enums"."name" = $1 AND 1 = 0 ["regexName"] [database-id: psql] (PostgresNIO/PostgresDatabase+Query.swift:124)
23[ DEBUG ] Application shutting down (Vapor/Application.swift:138)
24Fatal error: Error raised at top level: previousError(server: duplicate key value violates unique constraint "uq:_fluent_enums.name+_fluent_enums.case" (_bt_check_unique)): file /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1200.2.24.2/swift/stdlib/public/core/ErrorType.swift, line 200
252020-08-13 18:31:30.299791+0300 Run[40536:691521] Fatal error: Error raised at top level: previousError(server: duplicate key value violates unique constraint "uq:_fluent_enums.name+_fluent_enums.case" (_bt_check_unique)): file /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1200.2.24.2/swift/stdlib/public/core/ErrorType.swift, line 200