TheThingsNetwork / lorawan-stack-migrate

Migrate devices from other LoRaWAN Network Servers to The Things Stack
Apache License 2.0
8 stars 3 forks source link

Allow the deletion of historical timestamps on migrate #61

Closed adriansmares closed 1 year ago

adriansmares commented 1 year ago

Summary

References https://github.com/TheThingsNetwork/lorawan-stack-migrate/pull/55#issuecomment-1324571695

In the ttnv3 source, exporting end devices without a session should also clean up their associated timestamps.

Why do we need this?

Since the timestamps are related to sessions which have not been migrated.

What is already there? What do you see now?

Unsetting session, pending_session, mac_state, pending_mac_state.

What is missing? What do you want to see?

last_dev_status_received_at, last_dev_status_f_cnt_up, activated_at, last_seen_at.

Environment

0.9.0-rc1.

How do you propose to implement this?

Also unset these fields.

How do you propose to test this?

Export a device with existing fields and check what happens.

Can you do this yourself and submit a Pull Request?

Can review.