1
- use std:: { collections :: HashMap , fmt:: Write , sync:: Arc , time:: Instant } ;
1
+ use std:: { fmt:: Write , sync:: Arc , time:: Instant } ;
2
2
3
3
use diesel:: {
4
4
connection:: SimpleConnection ,
@@ -24,10 +24,7 @@ use crate::{
24
24
relational:: { Table , VID_COLUMN } ,
25
25
} ;
26
26
27
- use super :: {
28
- index:: { load_indexes_from_table, IndexList } ,
29
- Catalog , Layout , Namespace ,
30
- } ;
27
+ use super :: { Catalog , Layout , Namespace } ;
31
28
32
29
// Additions to `Table` that are useful for pruning
33
30
impl Table {
@@ -97,15 +94,9 @@ impl TablePair {
97
94
if catalog:: table_exists ( conn, dst_nsp. as_str ( ) , & dst. name ) ? {
98
95
writeln ! ( query, "truncate table {};" , dst. qualified_name) ?;
99
96
} 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
-
106
97
// In case of pruning we don't do delayed creation of indexes,
107
98
// 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) ?;
109
100
}
110
101
conn. batch_execute ( & query) ?;
111
102
0 commit comments