You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/resources/db/migration/V1.0.4__Baseline_API.sql
+16-3Lines changed: 16 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -274,7 +274,7 @@ FROM (
274
274
edition_size AS total,
275
275
COUNT(*) AS minted,
276
276
count(CASE WHEN burned THEN 1 end) AS burned,
277
-
CASE WHEN edition_size !=0 THEN edition_size -COUNT(*) ELSE 0 END AS mintable,
277
+
CASE WHEN edition_size !=0 THEN edition_size -COUNT(*) ELSE -1 END AS mintable,
278
278
MAX(t1.mint_date) AS last_minting_date
279
279
FROM soonmarket_nft t1
280
280
WHERE edition_size !=1
@@ -283,6 +283,16 @@ LEFT JOIN LATERAL (SELECT * from soonmarket_nft WHERE t1.template_id=template_id
283
283
UNION ALL
284
284
SELECTNULL,NULL,NULL,NULL, *FROM soonmarket_nft WHERE edition_size=1)t
285
285
286
+
COMMENT ON VIEW soonmarket_manageable_nft_v IS 'View for manageable NFTs (parent row, creators)';
287
+
288
+
--
289
+
290
+
CREATE OR replaceVIEWsoonmarket_manageable_edition_nft_vas
291
+
SELECT*
292
+
FROM soonmarket_nft WHERE edition_size!=1;
293
+
294
+
COMMENT ON VIEW soonmarket_manageable_edition_nft_v IS 'View for manageable edition NFTs (child row, creators)';
295
+
286
296
----------------------------------
287
297
-- Collection Detail View
288
298
----------------------------------
@@ -331,14 +341,17 @@ COALESCE(b1.reporter_comment,b2.reporter_comment) AS blacklist_reason,
331
341
CASE WHEN b1.reporteris not null THEN 'NFT Watch' WHEN b2.reporteris not null THEN 'Soon.Market' ELSE null END AS blacklist_actor,
332
342
CASE WHEN s1.collection_idIS NOT NULLors2.collection_idIS NOT NULL THEN TRUE ELSE FALSE END AS shielded,
333
343
t2.name,
334
-
t2.description
344
+
t2.description,
345
+
t5.schema_id,
346
+
t5.schema_name
335
347
FROM atomicassets_collection t1
336
348
LEFT JOIN atomicassets_collection_data_log t2 ONt1.collection_id=t2.collection_idandt2.current
337
349
LEFT JOIN atomicassets_collection_royalty_log t3 ONt1.collection_id=t3.collection_idandt3.current
338
350
LEFT JOIN nft_watch_blacklist b1 ONt1.collection_id=b1.collection_id
339
351
LEFT JOIN soonmarket_internal_blacklist b2 ONt1.collection_id=b2.collection_id
340
352
LEFT JOIN nft_watch_shielding s1 ONt1.collection_id=s1.collection_id
341
-
LEFT JOIN soonmarket_internal_shielding s2 ONt1.collection_id=s2.collection_id;
353
+
LEFT JOIN soonmarket_internal_shielding s2 ONt1.collection_id=s2.collection_id
354
+
LEFT JOIN LATERAL (SELECT string_agg(schema_id,',') AS schema_id,string_agg(SCHEMA_NAME,',') AS schema_name FROM atomicassets_schema WHEREt1.collection_id=collection_id GROUP BYt1.collection_id)t5 ON true;;
0 commit comments