emqx / MQTTX

A Powerful and All-in-One MQTT 5.0 client toolbox for Desktop, CLI and WebSocket.
https://mqttx.app
Apache License 2.0
3.84k stars 444 forks source link

fix(desktop): support rebuild database when load connection error #1711

Closed ysfscream closed 3 months ago

ysfscream commented 3 months ago

PR Checklist

If you have any questions, you can refer to the Contributing Guide

What is the current behavior?

The user database encountered an issue with missing fields under uncertain circumstances, and the migration script couldn't resolve it.

image

image

Issue Number

Example: https://askemq.com/t/topic/8672/2

What is the new behavior?

This is a temporary solution: we will reuse the previous database error component to rebuild the database file. The downside is that it will cause the loss of database content. We will continue to optimize and improve the data migration method in the future.

image

Does this PR introduce a breaking change?

Specific Instructions

Are there any specific instructions or things that should be known prior to review?

Other information