Page MenuHomeDevCentral

D3183.diff
No OneTemporary

D3183.diff

diff --git a/sql/db-A/zed/hypership-tower-art-locations-free.sql b/sql/db-A/zed/hypership-tower-art-locations-free.sql
new file mode 100644
--- /dev/null
+++ b/sql/db-A/zed/hypership-tower-art-locations-free.sql
@@ -0,0 +1,35 @@
+-- Zed
+-- Where can we put artwork?
+
+USE zed_prod;
+
+SET @max_tower_floor = 100;
+
+-- Counters T and C for T1C1..T100C6
+WITH RECURSIVE counter_tower AS (
+ SELECT 1 AS floor_counter, 1 AS corridor
+ UNION ALL
+ SELECT
+ (CASE
+ WHEN corridor < 6 THEN floor_counter
+ WHEN corridor = 6 THEN floor_counter + 1
+ END) AS floor_counter,
+ (CASE
+ WHEN corridor < 6 THEN corridor + 1
+ WHEN corridor = 6 THEN 1
+ END) AS corridor
+ FROM counter_tower
+ WHERE floor_counter < @max_tower_floor
+)
+
+SELECT
+ location_local
+FROM
+ (SELECT CONCAT("T", floor_counter, "C", corridor) as location_local FROM counter_tower) as locations
+WHERE
+ location_local NOT IN (
+ SELECT DISTINCT location_local
+ FROM content_locations
+ WHERE location_global = "B00001001" -- Hypership tower
+ )
+;
diff --git a/sql/db-A/zed/hypership-tower-art-locations.sql b/sql/db-A/zed/hypership-tower-art-locations.sql
new file mode 100644
--- /dev/null
+++ b/sql/db-A/zed/hypership-tower-art-locations.sql
@@ -0,0 +1,12 @@
+-- Zed
+-- Where do we have artwork?
+
+USE zed_prod;
+
+SELECT
+ DISTINCT location_local
+FROM
+ content_locations
+WHERE
+ location_global = "B00001001" -- Hypership tower
+ORDER BY location_local ASC;

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 21:12 (8 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2265103
Default Alt Text
D3183.diff (1 KB)

Event Timeline