1- use std:: { collections :: HashMap , fmt:: Write , sync:: Arc , time:: Instant } ;
1+ use std:: { fmt:: Write , sync:: Arc , time:: Instant } ;
22
33use diesel:: {
44 connection:: SimpleConnection ,
@@ -24,10 +24,7 @@ use crate::{
2424 relational:: { Table , VID_COLUMN } ,
2525} ;
2626
27- use super :: {
28- index:: { load_indexes_from_table, IndexList } ,
29- Catalog , Layout , Namespace ,
30- } ;
27+ use super :: { Catalog , Layout , Namespace } ;
3128
3229// Additions to `Table` that are useful for pruning
3330impl Table {
@@ -97,15 +94,9 @@ impl TablePair {
9794 if catalog:: table_exists ( conn, dst_nsp. as_str ( ) , & dst. name ) ? {
9895 writeln ! ( query, "truncate table {};" , dst. qualified_name) ?;
9996 } else {
100- let mut list = IndexList {
101- indexes : HashMap :: new ( ) ,
102- } ;
103- let indexes = load_indexes_from_table ( conn, & src, dst_nsp. as_str ( ) ) ?;
104- list. indexes . insert ( src. name . to_string ( ) , indexes) ;
105-
10697 // In case of pruning we don't do delayed creation of indexes,
10798 // as the asumption is that there is not that much data inserted.
108- dst. as_ddl ( schema, catalog, Some ( & list ) , & mut query) ?;
99+ dst. as_ddl ( schema, catalog, None , & mut query) ?;
109100 }
110101 conn. batch_execute ( & query) ?;
111102
0 commit comments