WilfredAlmeida / LightDAS

Lightweight DAS for Solana
GNU Affero General Public License v3.0
34 stars 6 forks source link

Read tree addresses from database #4

Closed WilfredAlmeida closed 5 months ago

WilfredAlmeida commented 6 months ago

Currently, tree addresses are hardcoded in the main.rs file. The for this is:

  1. We use Metaplex DAS' database and migrations written in sea-orm
  2. LightDAS uses sea-orm as well
  3. sea-orm maintains a table in the database about the applied migrations
  4. If (1) applied some migrations, (2) cannot apply because when applying a migration, SeaORM checks the table and expects the older migration files to be present.
  5. However, migrations of (1) and (2) cannot be together because they're altogether maintained by different teams i.e. Metaplex DAS team and LightDAS team

Figure out a way to apply migrations from LightDAS via SeaORM

WilfredAlmeida commented 5 months ago

A possible fix to this is to skip using sea-orm for the trees table and directly have the create tree SQL commands in the code and run them directly on the db @KartikSoneji