diff --git a/Bucketeer.xcodeproj/xcshareddata/xcschemes/Example.xcscheme b/Bucketeer.xcodeproj/xcshareddata/xcschemes/Example.xcscheme index 8d2d7d3d..19fdffe4 100644 --- a/Bucketeer.xcodeproj/xcshareddata/xcschemes/Example.xcscheme +++ b/Bucketeer.xcodeproj/xcshareddata/xcschemes/Example.xcscheme @@ -53,12 +53,12 @@ diff --git a/Bucketeer/Sources/Internal/Database/Migration/Migration2to3.swift b/Bucketeer/Sources/Internal/Database/Migration/Migration2to3.swift index 3828227a..daa4357d 100644 --- a/Bucketeer/Sources/Internal/Database/Migration/Migration2to3.swift +++ b/Bucketeer/Sources/Internal/Database/Migration/Migration2to3.swift @@ -6,9 +6,6 @@ final class Migration2to3: Migration { } func migration() throws { - try db.exec(query: "DROP TABLE IF EXISTS Evaluations") - let evaluationTable = SQLite.Table(entity: EvaluationEntity()) - let evaluationSql = evaluationTable.sqlToCreate() - try db.exec(query: evaluationSql) + try db.exec(query: "DELETE FROM Evaluations") } } diff --git a/BucketeerTests/MigrationTests.swift b/BucketeerTests/MigrationTests.swift index e44effed..6f1f19b2 100644 --- a/BucketeerTests/MigrationTests.swift +++ b/BucketeerTests/MigrationTests.swift @@ -58,7 +58,7 @@ AND (name NOT LIKE 'sqlite_%' AND name NOT LIKE 'ios_%') .mock1 ] try dao.put(userId: "user1", evaluations: mocks) - // Run migrate , it will drop `evaluations` table + // Run migrate , it will delete all data from `evaluations` table try Migration2to3(db: db).migration() let sql = """ SELECT id FROM Evaluations