Altalogy / tari

The Tari protocol
https://tari.com
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

chore: refactor of txs migrations #421

Closed tomaszantas closed 1 year ago

tomaszantas commented 1 year ago

Description

This PR introduces breaking changes to the SQLite DB. It is required to delete old db files after merging this PR.

Steps to remove db file (MacOS)

// navigate to the folder containing com.tari.launchpad
$ cd ~/Library/Application\ Support/

// Delete whole folder containing db files
$ rm -rf com.tari.launchpad

Changes:

Motivation and Context

373

How Has This Been Tested?

Manually inserted sample transaction:

transactionsRepository.addOrReplace({
      event: TransactionEvent.Mined,
      tx_id: 'test-id-1',
      source_pk: 'source-1b',
      dest_pk: 'destination-1',
      status: 'Coinbase',
      direction: TransactionDirection.Inbound,
      amount: 1000,
      message: 'test fancy message',
      is_coinbase: true,
    })

...and explored the database with sqlite browser (sqlite db location: ~/Library/Application Support/com.tari.launchpad.

Then, added few more new and updating transactions.

Alerts UI fix

Before:

image

After:

image

tomaszantas commented 1 year ago

This PR makes a breaking change in SQLite

It requires to remove current db file. On MacOS, the file is located in ~/Library/Application\ Support/com.tari.launchpad.

Instructions to delete db file (tested on MacOS):

$ cd ~/Library/Application\ Support/

// Delete whole folder containing db files
$ rm -rf com.tari.launchpad

Now, you can start the launchpad app.