File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,8 +64,9 @@ enum MigrationRunner {
6464 " SELECT * FROM \( MigrationRunner . migrationTableName) ORDER BY number ASC "
6565 }
6666
67+ let migrations : [ Int ] = try statement. fetchAll ( )
6768 try tx. commit ( )
68- return try statement . fetchAll ( )
69+ return migrations
6970 }
7071
7172 private static func insertMigration( version: Int , tx: borrowing Transaction ) throws {
Original file line number Diff line number Diff line change @@ -17,12 +17,13 @@ struct GenTests {
1717 let migrations = try compiler. compile ( migration: load ( file: " Migrations " ) )
1818 let queries = try compiler. compile ( queries: load ( file: " Queries " ) )
1919
20- let language = SwiftLanguage ( options: GenerationOptions ( databaseName: " " ) )
20+ let language = SwiftLanguage ( options: GenerationOptions ( databaseName: " DB " ) )
2121 let rawOutput = try language. generate (
2222 migrations: migrations. 0 . map ( \. sanitizedSource) ,
2323 queries: [ ( " Queries " , queries. 0 ) ] ,
2424 schema: compiler. schema
2525 )
26+ print ( rawOutput)
2627
2728 for diagnostics in migrations. 1 {
2829 Issue . record ( diagnostics)
You can’t perform that action at this time.
0 commit comments