Skip to content

Commit 50a74f7

Browse files
committed
Cleanup
1 parent 3f27fb9 commit 50a74f7

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

Tests/GRDBTests/MutablePersistableRecordTests.swift

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2802,39 +2802,36 @@ class Issue1820Tests: GRDBTestCase {
28022802
// Regression test for https://github.com/groue/GRDB.swift/issues/1820
28032803
func testIssue1820() throws {
28042804
struct Serving: Codable, FetchableRecord, PersistableRecord {
2805-
let id: UUID
2806-
var description: String
2807-
var foodId: String
2808-
2809-
static let author = hasOne(Food.self)
2805+
let id: UUID
2806+
var description: String
2807+
var foodId: String
2808+
2809+
static let author = hasOne(Food.self)
28102810
}
2811-
2811+
28122812
struct Food: Codable, FetchableRecord, PersistableRecord {
2813-
let id: UUID
2814-
var name: String
2815-
var foodId: String
2813+
let id: UUID
2814+
var name: String
2815+
var foodId: String
28162816
}
28172817

28182818
let dbQueue = try makeDatabaseQueue()
2819-
defer {
2820-
print(sqlQueries.joined(separator: "\n"))
2821-
}
28222819
try dbQueue.write { db in
28232820
try db.create(table: "food") { t in
2824-
t.column("id", .blob).primaryKey()
2825-
t.column("name", .text)
2826-
t.column("foodId", .text).unique()
2821+
t.column("id", .blob).primaryKey()
2822+
t.column("name", .text)
2823+
t.column("foodId", .text).unique()
28272824
}
28282825

28292826
try db.create(table: "serving") { t in
2830-
t.column("id", .blob).primaryKey()
2831-
t.column("description", .text)
2832-
t.column("foodId", .text).references("food", column: "foodId")
2827+
t.column("id", .blob).primaryKey()
2828+
t.column("description", .text)
2829+
t.column("foodId", .text).references("food", column: "foodId")
28332830
}
28342831

28352832
try db.create(virtualTable: "food_fts", using: FTS5()) { t in
2836-
t.synchronize(withTable: "food")
2837-
t.column("name")
2833+
t.synchronize(withTable: "food")
2834+
t.column("name")
28382835
}
28392836

28402837
try Food(id: UUID(), name: "Apple", foodId: "apple").save(db)

0 commit comments

Comments
 (0)