@@ -262,38 +262,13 @@ function generateDbUrlForAfProd(connectionString) {
262262 return connectionString . toString ( ) ;
263263}
264264
265- function getSqliteInspectionUrl ( dbUrl , appName ) {
266- const connectionString = parseConnectionString ( dbUrl ) ;
267- const sqliteFile = connectionString . host ;
268- const resolvedSqliteFile = path . isAbsolute ( sqliteFile )
269- ? sqliteFile
270- : path . join ( process . cwd ( ) , appName , sqliteFile ) ;
271-
272- if ( ! fs . existsSync ( resolvedSqliteFile ) ) {
273- return null ;
274- }
275-
276- return `sqlite://${ resolvedSqliteFile } ` ;
277- }
278-
279265async function inspectDatabaseCleanState ( options ) {
280266 const connectionString = parseConnectionString ( options . db ) ;
281267 const provider = detectDbProvider ( connectionString . protocol ) ;
282- let inspectionDbUrl = connectionString . toString ( ) ;
283-
284- if ( provider === 'sqlite' ) {
285- const sqliteInspectionUrl = getSqliteInspectionUrl ( options . db , options . appName ) ;
286- if ( ! sqliteInspectionUrl ) {
287- options . databaseCleanState = { blockingObjects : [ ] } ;
288- options . existingDb = false ;
289- return ;
290- }
291- inspectionDbUrl = sqliteInspectionUrl ;
292- }
293268
294269 const Connector = ( await import ( DATABASE_CONNECTOR_IMPORTS [ provider ] ) ) . default ;
295270 const connector = new Connector ( ) ;
296- await connector . setupClient ( inspectionDbUrl ) ;
271+ await connector . setupClient ( connectionString . toString ( ) ) ;
297272
298273 try {
299274 options . databaseCleanState = await connector . isDatabaseEmpty ( ) ;
0 commit comments