@@ -66,7 +66,6 @@ fn from_unique_index_to_without(mut api: TestApi) {
6666 content: from_schema. to_string( ) ,
6767 } ] ,
6868 } ) ,
69- shadow_database_url : None ,
7069 to : DiffTarget :: SchemaDatamodel ( SchemasContainer {
7170 files : vec ! [ SchemaContainer {
7271 path: to_file. to_string_lossy( ) . into_owned( ) ,
@@ -177,7 +176,6 @@ fn from_unique_index_to_pk(mut api: TestApi) {
177176 content: from_schema. to_string( ) ,
178177 } ] ,
179178 } ) ,
180- shadow_database_url : None ,
181179 to : DiffTarget :: SchemaDatamodel ( SchemasContainer {
182180 files : vec ! [ SchemaContainer {
183181 path: to_file. to_string_lossy( ) . into_owned( ) ,
@@ -369,7 +367,6 @@ fn from_empty_to_migrations_directory(mut api: TestApi) {
369367 from : DiffTarget :: Empty ,
370368 to : DiffTarget :: Migrations ( migrations_list) ,
371369 script : true ,
372- shadow_database_url : Some ( api. connection_string ( ) . to_owned ( ) ) ,
373370 filters : SchemaFilter :: default ( ) ,
374371 } ;
375372
@@ -421,7 +418,6 @@ fn from_empty_to_migrations_folder_without_shadow_db_url_must_error(mut api: Tes
421418 from : DiffTarget :: Empty ,
422419 to : DiffTarget :: Migrations ( migrations_list) ,
423420 script : true ,
424- shadow_database_url : None , // TODO: ?
425421 filters : SchemaFilter :: default ( ) ,
426422 } ;
427423
@@ -436,7 +432,7 @@ fn from_empty_to_migrations_folder_without_shadow_db_url_must_error(mut api: Tes
436432 . unwrap_err ( ) ;
437433
438434 let expected_error = expect ! [ [ r#"
439- You must pass the `--shadow-database-url` flag or set `datasource.shadowDatabaseUrl` in your `prisma.config.ts` if you want to diff a migrations directory.
435+ You must set `datasource.shadowDatabaseUrl` in your `prisma.config.ts` if you want to diff a migrations directory.
440436 "# ] ] ;
441437 expected_error. assert_eq ( & err. to_string ( ) ) ;
442438}
@@ -478,7 +474,6 @@ fn from_schema_datamodel_to_url(mut api: TestApi) {
478474 } ] ,
479475 } ) ,
480476 script : true ,
481- shadow_database_url : None ,
482477 to : DiffTarget :: Url ( UrlContainer { url : second_url } ) ,
483478 filters : SchemaFilter :: default ( ) ,
484479 } ;
@@ -530,7 +525,6 @@ fn from_schema_datasource_relative(api: TestApi) {
530525 config_dir : schema_path. parent ( ) . unwrap ( ) . to_string_lossy ( ) . into_owned ( ) ,
531526 } ) ,
532527 script : true ,
533- shadow_database_url : None ,
534528 to : DiffTarget :: Empty ,
535529 filters : SchemaFilter :: default ( ) ,
536530 } ;
@@ -590,7 +584,6 @@ fn from_schema_datasource_to_url(mut api: TestApi) {
590584 config_dir : schema_path. parent ( ) . unwrap ( ) . to_string_lossy ( ) . into_owned ( ) ,
591585 } ) ,
592586 script : true ,
593- shadow_database_url : None ,
594587 to : DiffTarget :: Url ( UrlContainer { url : second_url } ) ,
595588 filters : SchemaFilter :: default ( ) ,
596589 } ;
@@ -649,7 +642,6 @@ fn with_schema_filters(api: TestApi) {
649642 config_dir : schema_path. parent ( ) . unwrap ( ) . to_string_lossy ( ) . into_owned ( ) ,
650643 } ) ,
651644 script : true ,
652- shadow_database_url : None ,
653645 to : DiffTarget :: Url ( UrlContainer { url : second_url } ) ,
654646 filters : SchemaFilter {
655647 external_tables : vec ! [ "external_table" . to_string( ) ] ,
@@ -704,7 +696,6 @@ fn with_invalid_schema_filter_sqlite(mut api: TestApi) {
704696 config_dir : schema_path. parent ( ) . unwrap ( ) . to_string_lossy ( ) . into_owned ( ) ,
705697 } ) ,
706698 script : true ,
707- shadow_database_url : None ,
708699 to : DiffTarget :: Url ( UrlContainer { url : second_url } ) ,
709700 filters : SchemaFilter {
710701 external_tables : vec ! [ "public.external_table" . to_string( ) ] ,
@@ -743,7 +734,6 @@ fn with_invalid_schema_filter_postgres(mut api: TestApi) {
743734 config_dir : schema_path. parent ( ) . unwrap ( ) . to_string_lossy ( ) . into_owned ( ) ,
744735 } ) ,
745736 script : true ,
746- shadow_database_url : None ,
747737 to : DiffTarget :: Url ( UrlContainer {
748738 url : connection_string. to_string ( ) ,
749739 } ) ,
@@ -786,7 +776,6 @@ fn from_url_to_url(mut api: TestApi) {
786776 exit_code : None ,
787777 from : DiffTarget :: Url ( UrlContainer { url : first_url } ) ,
788778 script : true ,
789- shadow_database_url : None ,
790779 to : DiffTarget :: Url ( UrlContainer { url : second_url } ) ,
791780 filters : SchemaFilter :: default ( ) ,
792781 } ;
@@ -845,7 +834,6 @@ fn diffing_mongo_schemas_to_script_returns_a_nice_error() {
845834 content: from. to_string( ) ,
846835 } ] ,
847836 } ) ,
848- shadow_database_url : None ,
849837 to : DiffTarget :: SchemaDatamodel ( SchemasContainer {
850838 files : vec ! [ SchemaContainer {
851839 path: to_file. to_string_lossy( ) . into_owned( ) ,
@@ -879,7 +867,6 @@ fn diff_sqlite_migration_directories() {
879867 exit_code : None ,
880868 from : DiffTarget :: Migrations ( migrations_list) ,
881869 script : true ,
882- shadow_database_url : None ,
883870 to : DiffTarget :: Migrations ( migrations_list_2) ,
884871 filters : SchemaFilter :: default ( ) ,
885872 } ;
@@ -946,7 +933,6 @@ fn from_migrations_to_schema_datamodel_ignores_manual_partial_indexes_without_pr
946933 } ] ,
947934 } ) ,
948935 script : false ,
949- shadow_database_url : Some ( api. connection_string ( ) . to_owned ( ) ) ,
950936 filters : SchemaFilter :: default ( ) ,
951937 } ,
952938 ) ;
@@ -1011,7 +997,6 @@ fn from_schema_datamodel_to_migrations_ignores_manual_partial_indexes_without_pr
1011997 } ) ,
1012998 to : DiffTarget :: Migrations ( list_migrations ( migrations_dir. path ( ) ) . unwrap ( ) ) ,
1013999 script : false ,
1014- shadow_database_url : Some ( api. connection_string ( ) . to_owned ( ) ) ,
10151000 filters : SchemaFilter :: default ( ) ,
10161001 } ,
10171002 ) ;
@@ -1084,7 +1069,6 @@ fn from_migrations_to_url_ignores_manual_partial_indexes_with_engine_seeded_sche
10841069 url : api. connection_string ( ) . to_owned ( ) ,
10851070 } ) ,
10861071 script : false ,
1087- shadow_database_url : Some ( api. connection_string ( ) . to_owned ( ) ) ,
10881072 filters : SchemaFilter :: default ( ) ,
10891073 } ,
10901074 ) ;
@@ -1140,7 +1124,6 @@ fn diffing_mongo_schemas_works() {
11401124 content: from. to_string( ) ,
11411125 } ] ,
11421126 } ) ,
1143- shadow_database_url : None ,
11441127 to : DiffTarget :: SchemaDatamodel ( SchemasContainer {
11451128 files : vec ! [ SchemaContainer {
11461129 path: to_file. to_string_lossy( ) . into_owned( ) ,
@@ -1193,7 +1176,6 @@ fn diff_with_exit_code_and_empty_diff_returns_zero() {
11931176 } ] ,
11941177 } ) ,
11951178 script : false ,
1196- shadow_database_url : None ,
11971179 filters : SchemaFilter :: default ( ) ,
11981180 } ,
11991181 ) ;
@@ -1234,7 +1216,6 @@ fn diff_with_exit_code_and_non_empty_diff_returns_two() {
12341216 } ] ,
12351217 } ) ,
12361218 script : false ,
1237- shadow_database_url : None ,
12381219 filters : SchemaFilter :: default ( ) ,
12391220 } ,
12401221 ) ;
@@ -1262,7 +1243,6 @@ fn diff_with_non_existing_sqlite_database_from_url() {
12621243 exit_code : Some ( true ) ,
12631244 from : DiffTarget :: Empty ,
12641245 script : false ,
1265- shadow_database_url : None ,
12661246 to : DiffTarget :: Url ( UrlContainer {
12671247 url : format ! ( "file:{}" , tmpdir. path( ) . join( "db.sqlite" ) . to_string_lossy( ) ) ,
12681248 } ) ,
@@ -1298,7 +1278,6 @@ fn diff_with_non_existing_sqlite_database_from_datasource() {
12981278 exit_code : Some ( true ) ,
12991279 from : DiffTarget :: Empty ,
13001280 script : false ,
1301- shadow_database_url : None ,
13021281 to : DiffTarget :: SchemaDatasource ( SchemasWithConfigDir {
13031282 files : vec ! [ SchemaContainer {
13041283 path: schema_path. to_string_lossy( ) . into_owned( ) ,
@@ -1370,7 +1349,6 @@ fn from_multi_file_schema_datasource_to_url(mut api: TestApi) {
13701349 config_dir : base_dir. path ( ) . to_string_lossy ( ) . into_owned ( ) ,
13711350 } ) ,
13721351 script : true ,
1373- shadow_database_url : None ,
13741352 to : DiffTarget :: Url ( UrlContainer { url : second_url } ) ,
13751353 filters : SchemaFilter :: default ( ) ,
13761354 } ;
@@ -1436,7 +1414,6 @@ fn from_multi_file_schema_datamodel_to_url(mut api: TestApi) {
14361414 exit_code : None ,
14371415 from : DiffTarget :: SchemaDatamodel ( SchemasContainer { files : from_files } ) ,
14381416 script : true ,
1439- shadow_database_url : None ,
14401417 to : DiffTarget :: Url ( UrlContainer { url : second_url } ) ,
14411418 filters : SchemaFilter :: default ( ) ,
14421419 } ;
0 commit comments