near / near-indexer-for-explorer

Watch NEAR network and store all the data from NEAR blockchain to PostgreSQL database
https://near-indexers.io/docs/projects/near-indexer-for-explorer
GNU General Public License v3.0
124 stars 56 forks source link

fix: Make diesel schema generator work again #154

Closed khorolets closed 3 years ago

khorolets commented 3 years ago

src/schema.rs is generated by command diesel print-schema src/schema.rs

It was a little bit broken because of the missing table in diesel.toml. Also, @telezhnaya has introduced aggregated__lockups view in SQL and we need it as a table! in schema. To avoid doing it manually I've made use of patch_file field from diesel-orm documentation

In addition, it removes unused imports which I would do manually for a year.