@@ -33,6 +33,8 @@ class CSV extends Source
3333 * format: `{databaseId:tableId}`
3434 */
3535 private string $ resourceId ;
36+ private string $ databaseInternalId ;
37+ private string $ tableInternalId ;
3638
3739 private Device $ device ;
3840
@@ -42,13 +44,17 @@ class CSV extends Source
4244
4345 public function __construct (
4446 string $ resourceId ,
47+ string $ databaseInternalId ,
48+ string $ tableInternalId ,
4549 string $ filePath ,
4650 Device $ device ,
4751 ?UtopiaDatabase $ dbForProject
4852 ) {
4953 $ this ->device = $ device ;
5054 $ this ->filePath = $ filePath ;
5155 $ this ->resourceId = $ resourceId ;
56+ $ this ->databaseInternalId = $ databaseInternalId ;
57+ $ this ->tableInternalId = $ tableInternalId ;
5258 $ this ->database = new DatabaseReader ($ dbForProject );
5359 }
5460
@@ -133,7 +139,9 @@ private function exportRows(int $batchSize): void
133139
134140 [$ databaseId , $ tableId ] = explode (': ' , $ this ->resourceId );
135141 $ database = new Database ($ databaseId , '' );
142+ $ database ->setSequence ($ this ->databaseInternalId );
136143 $ table = new Table ($ database , '' , $ tableId );
144+ $ table ->setSequence ($ this ->tableInternalId );
137145
138146 while (true ) {
139147 $ queries = [$ this ->database ->queryLimit ($ batchSize )];
0 commit comments