pub async fn insert_initial_writes_from_snapshot(
        &mut self,
        snapshot_storage_logs: &[SnapshotStorageLog],
    ) -> DalResult<()> {
        let storage_logs_len = snapshot_storage_logs.len();
        let copy = CopyStatement::new(
            "COPY initial_writes (hashed_key, index, l1_batch_number, created_at, updated_at) \
             FROM STDIN WITH (DELIMITER '|')",
        )
        .instrument("insert_initial_writes_from_snapshot")
        .with_arg("storage_logs.len", &storage_logs_len)
        .start(self.storage)
        .await?;

        let mut bytes: Vec<u8> = Vec::new();
        let now = Utc::now().naive_utc().to_string();
        for log in snapshot_storage_logs {
            let row = format!(
                "\\\\x{:x}|{}|{}|{}|{}\n",
                log.key, log.enumeration_index, log.l1_batch_number_of_initial_write, now, now,
            );
            bytes.extend_from_slice(row.as_bytes());
        }
        copy.send(&bytes).await
    }
Insert initial writes and assigns indices to them.
Assumes indices are already assigned for all saved initial_writes, so must be called only after the migration.
core/lib/dal/src/storage_logs_dedup_dal.rs