@@ -104,7 +104,7 @@ func (suite *planGeneratorTestSuite) TestGenerate() {
104104 tempDbFactory := suite .mustBuildTempDbFactory (context .Background ())
105105 defer tempDbFactory .Close ()
106106
107- plan , err := Generate (context .Background (), connPool , DDLSchemaSource ([]string {newSchemaDDL }), WithTempDbFactory (tempDbFactory ))
107+ plan , err := Generate (context .Background (), DBSchemaSource ( connPool ) , DDLSchemaSource ([]string {newSchemaDDL }), WithTempDbFactory (tempDbFactory ))
108108 suite .NoError (err )
109109
110110 suite .mustApplyMigrationPlan (connPool , plan )
@@ -140,7 +140,7 @@ func (suite *planGeneratorTestSuite) TestGeneratePlan_SchemaSourceErr() {
140140 connPool := suite .mustGetTestDBPool ()
141141 defer connPool .Close ()
142142
143- _ , err := Generate (context .Background (), connPool , fakeSchemaSource ,
143+ _ , err := Generate (context .Background (), DBSchemaSource ( connPool ) , fakeSchemaSource ,
144144 WithTempDbFactory (tempDbFactory ),
145145 WithGetSchemaOpts (getSchemaOpts ... ),
146146 WithLogger (logger ),
@@ -163,7 +163,7 @@ func (suite *planGeneratorTestSuite) TestGenerate_CannotPackNewTablesWithoutIgno
163163 connPool := suite .mustGetTestDBPool ()
164164 defer connPool .Close ()
165165
166- _ , err := Generate (context .Background (), connPool , DDLSchemaSource ([]string {`` }),
166+ _ , err := Generate (context .Background (), DBSchemaSource ( connPool ) , DDLSchemaSource ([]string {`` }),
167167 WithTempDbFactory (tempDbFactory ),
168168 WithDataPackNewTables (),
169169 WithRespectColumnOrder (),
@@ -174,7 +174,7 @@ func (suite *planGeneratorTestSuite) TestGenerate_CannotPackNewTablesWithoutIgno
174174func (suite * planGeneratorTestSuite ) TestGenerate_CannotBuildMigrationFromDDLWithoutTempDbFactory () {
175175 pool := suite .mustGetTestDBPool ()
176176 defer pool .Close ()
177- _ , err := Generate (context .Background (), pool , DDLSchemaSource ([]string {`` }),
177+ _ , err := Generate (context .Background (), DBSchemaSource ( pool ) , DDLSchemaSource ([]string {`` }),
178178 WithIncludeSchemas ("public" ),
179179 WithDoNotValidatePlan (),
180180 )
@@ -184,7 +184,7 @@ func (suite *planGeneratorTestSuite) TestGenerate_CannotBuildMigrationFromDDLWit
184184func (suite * planGeneratorTestSuite ) TestGenerate_CannotValidateWithoutTempDbFactory () {
185185 pool := suite .mustGetTestDBPool ()
186186 defer pool .Close ()
187- _ , err := Generate (context .Background (), pool , DDLSchemaSource ([]string {`` }),
187+ _ , err := Generate (context .Background (), DBSchemaSource ( pool ) , DDLSchemaSource ([]string {`` }),
188188 WithIncludeSchemas ("public" ),
189189 WithDoNotValidatePlan (),
190190 )
0 commit comments