-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #171 from xch-dev/multicat-offer-fix
Fix multiple CATs in imported offer
- Loading branch information
Showing
11 changed files
with
83 additions
and
42 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
.sqlx/query-37bd891013a2e43f4daaf084b0b21f535e373a878e2a8acc8a15e17cf66e1dea.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
.sqlx/query-724126b415eeecb3b39b4aae2d8adfd7ff1090d41732d09f61e37f7d257963f9.json
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
.sqlx/query-a93526d49ab50f772b1c359d3ab88ef45570143ed28f265d76c6e17efdd12dce.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
.sqlx/query-b0a032da8f11fba1cd9689b08d98c0bef5f3d29ce386efd4a3acdc95e50fadd3.json
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
.sqlx/query-bf81707e7f55db9d5664677a2917b743d5a16928a014259e6fe5b395a263da03.json
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
.sqlx/query-ea4bb56089373de61b9d5e4f7865c1090b0f684567d1e4de391373d3b36faa9d.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
CREATE TABLE `offer_nfts_2` ( | ||
`offer_id` BLOB NOT NULL, | ||
`requested` BOOLEAN NOT NULL, | ||
`launcher_id` BLOB NOT NULL, | ||
`royalty_puzzle_hash` BLOB NOT NULL, | ||
`royalty_ten_thousandths` INTEGER NOT NULL, | ||
`name` TEXT, | ||
`thumbnail` BLOB, | ||
`thumbnail_mime_type` TEXT, | ||
PRIMARY KEY (`offer_id`, `launcher_id`, `requested`), | ||
FOREIGN KEY (`offer_id`) REFERENCES `offers`(`offer_id`) ON DELETE CASCADE | ||
); | ||
|
||
CREATE TABLE `offer_cats_2` ( | ||
`offer_id` BLOB NOT NULL, | ||
`requested` BOOLEAN NOT NULL, | ||
`asset_id` BLOB NOT NULL, | ||
`amount` BLOB NOT NULL, | ||
`royalty` BLOB NOT NULL, | ||
`name` TEXT, | ||
`ticker` TEXT, | ||
`icon` TEXT, | ||
PRIMARY KEY (`offer_id`, `asset_id`, `requested`), | ||
FOREIGN KEY (`offer_id`) REFERENCES `offers`(`offer_id`) ON DELETE CASCADE | ||
); | ||
|
||
INSERT INTO `offer_nfts_2` SELECT * FROM `offer_nfts`; | ||
INSERT INTO `offer_cats_2` SELECT * FROM `offer_cats`; | ||
|
||
DROP TABLE `offer_nfts`; | ||
DROP TABLE `offer_cats`; | ||
|
||
ALTER TABLE `offer_nfts_2` RENAME TO `offer_nfts`; | ||
ALTER TABLE `offer_cats_2` RENAME TO `offer_cats`; | ||
|
||
CREATE INDEX `nft_offer_id` ON `offer_nfts` (`offer_id`); | ||
CREATE INDEX `cat_offer_id` ON `offer_cats` (`offer_id`); |
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