This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
generated from subsquid-labs/squid-substrate-template
-
Notifications
You must be signed in to change notification settings - Fork 11
Feat/142 collection stats #170
Merged
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1239dbc
feat: Update collection entity and add migration
alko89 ef07e3c
fix: migration
alko89 925dd4c
fix: remove comment
alko89 78a9ea2
fix: add floor, distribution and owner count
alko89 b48e6ec
fix: don't update ownerCount and distribution on mint
alko89 d043805
fix: remove comment and shorten result query
alko89 fd8f80f
Apply suggestions from code review
vikiival cf7b2f7
Merge remote-tracking branch 'upstream/main' into feat/142-collection…
alko89 e5f7530
Update src/mappings/utils/entity.ts
alko89 e298076
Merge remote-tracking branch 'origin/feat/142-collection-stats' into …
alko89 cec0410
fix: use correct id for query and fix floor
alko89 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ | |
|
||
.DS_Store | ||
dump_*.sql | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = class Data1681318561000 { | ||
name = 'Data1681318561000' | ||
|
||
async up(db) { | ||
await db.query(`ALTER TABLE "collection_entity" ADD "distribution" integer NOT NULL DEFAULT '0'`) | ||
await db.query(`ALTER TABLE "collection_entity" ADD "floor" numeric NOT NULL DEFAULT '0'`) | ||
await db.query(`ALTER TABLE "collection_entity" ADD "highest_sale" numeric NOT NULL DEFAULT '0'`) | ||
await db.query(`ALTER TABLE "collection_entity" ADD "owner_count" integer NOT NULL DEFAULT '0'`) | ||
await db.query(`ALTER TABLE "collection_entity" ADD "volume" numeric NOT NULL DEFAULT '0'`) | ||
} | ||
|
||
async down(db) { | ||
await db.query(`ALTER TABLE "collection_entity" DROP COLUMN "distribution"`) | ||
await db.query(`ALTER TABLE "collection_entity" DROP COLUMN "floor"`) | ||
await db.query(`ALTER TABLE "collection_entity" DROP COLUMN "highest_sale"`) | ||
await db.query(`ALTER TABLE "collection_entity" DROP COLUMN "owner_count"`) | ||
await db.query(`ALTER TABLE "collection_entity" DROP COLUMN "volume"`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this generated by squid @alko89 ?