All checks were successful
Deploy production / deploy (push) Successful in 1m7s
- hardware: slots, sections, usage, install/removal dates, images and a hidden flag on components and devices; setup_photos table; setup_overview view gains the new columns - data: hide the 2021 friends-PC build and the wrong 140mm / unknown fans (kept, not deleted); 7x SL-INF + 3 Kraken stock fans; mice, audio, desk extras; MacBook Pro 16 M2 Pro 1 TB; dates for every swap so the slider can rebuild the setup on any day - self-hosted product images in static/hardware (webp + thumbs) - prices and order details are owner-only (in a popover)
196 lines
35 KiB
SQL
196 lines
35 KiB
SQL
CREATE TABLE "hardware"."setup_photos" (
|
|
"id" bigint PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "hardware"."setup_photos_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 9223372036854775807 START WITH 1 CACHE 1),
|
|
"url" text NOT NULL,
|
|
"caption" text,
|
|
"taken_at" date,
|
|
"sort_order" integer DEFAULT 100 NOT NULL,
|
|
"created_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD COLUMN "slug" text;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD COLUMN "section" text;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD COLUMN "slot" text;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD COLUMN "installed_at" date;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD COLUMN "removed_at" date;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD COLUMN "replaces_id" bigint;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD COLUMN "usage" text;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD COLUMN "image_urls" text[] DEFAULT '{}'::text[] NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD COLUMN "image_sources" text[] DEFAULT '{}'::text[] NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD COLUMN "hidden" boolean DEFAULT false NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."devices" ADD COLUMN "installed_at" date;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."devices" ADD COLUMN "removed_at" date;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."devices" ADD COLUMN "image_urls" text[] DEFAULT '{}'::text[] NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."devices" ADD COLUMN "image_sources" text[] DEFAULT '{}'::text[] NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."devices" ADD COLUMN "hidden" boolean DEFAULT false NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD CONSTRAINT "components_slug_key" UNIQUE("slug");--> statement-breakpoint
|
|
CREATE INDEX "components_timeline_idx" ON "hardware"."components" ("installed_at","removed_at");--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD CONSTRAINT "components_replaces_id_components_id_fkey" FOREIGN KEY ("replaces_id") REFERENCES "hardware"."components"("id") ON DELETE SET NULL;--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD CONSTRAINT "components_section_check" CHECK (section is null or section in ('pc', 'desk', 'audio', 'sim'));--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD CONSTRAINT "components_usage_check" CHECK (usage is null or usage in ('current', 'stored', 'previous', 'work-issued', 'placeholder', 'planned', 'legacy', 'legacy-previous'));--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" ADD CONSTRAINT "components_dates_check" CHECK (removed_at is null or installed_at is null or removed_at >= installed_at);--> statement-breakpoint
|
|
ALTER TABLE "hardware"."components" DROP CONSTRAINT "components_category_check", ADD CONSTRAINT "components_category_check" CHECK (category in ('case', 'cpu', 'motherboard', 'ram', 'cpu_cooler', 'gpu', 'psu', 'storage', 'fan', 'lighting', 'monitor', 'mouse', 'keyboard', 'headset', 'audio', 'controller', 'accessory', 'microphone', 'mousepad', 'webcam', 'chair', 'other'));--> statement-breakpoint
|
|
-- Hand-written: grants (same pattern as the other hardware tables).
|
|
DO $$
|
|
BEGIN
|
|
IF EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'personal_app') THEN
|
|
GRANT SELECT, INSERT, UPDATE, DELETE ON hardware.setup_photos TO personal_app;
|
|
GRANT USAGE, SELECT ON SEQUENCE hardware.setup_photos_id_seq TO personal_app;
|
|
END IF;
|
|
IF EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'personal_ro') THEN
|
|
GRANT SELECT ON hardware.setup_photos TO personal_ro;
|
|
END IF;
|
|
END $$;
|
|
--> statement-breakpoint
|
|
-- setup_overview: same columns plus the timeline fields (appended, so grants survive).
|
|
CREATE OR REPLACE VIEW "hardware"."setup_overview" AS
|
|
SELECT d.name AS device,
|
|
d.label AS device_label,
|
|
d.kind AS device_kind,
|
|
d.status AS device_status,
|
|
c.category,
|
|
c.brand,
|
|
c.model,
|
|
c.quantity,
|
|
c.total_price_cents,
|
|
round(c.total_price_cents::numeric / 100.0, 2) AS total_price_eur,
|
|
c.shop,
|
|
c.order_date,
|
|
c.warranty_until,
|
|
(c.warranty_until >= current_date) AS under_warranty,
|
|
c.status,
|
|
c.verified,
|
|
c.specs,
|
|
c.dpi,
|
|
c.measured_dpi,
|
|
c.notes,
|
|
c.order_number,
|
|
c.invoice_number,
|
|
c.source,
|
|
c.id AS component_id,
|
|
c.section,
|
|
c.slot,
|
|
c.usage,
|
|
c.installed_at,
|
|
c.removed_at,
|
|
c.image_urls,
|
|
(c.hidden OR d.hidden) AS hidden
|
|
FROM hardware.components c
|
|
JOIN hardware.devices d ON d.id = c.device_id
|
|
ORDER BY d.sort_order, d.name,
|
|
array_position(ARRAY['case','cpu','motherboard','ram','cpu_cooler','gpu','psu','storage','fan','lighting','monitor','mouse','keyboard','headset','audio','microphone','controller','mousepad','webcam','chair','accessory','other'], c.category),
|
|
c.order_date NULLS LAST, c.model;
|
|
--> statement-breakpoint
|
|
-- Hand-written data (Stan via Setup Guy, 2026-10-25): slots, slider dates, self-hosted images,
|
|
-- corrections. Nothing is deleted: wrong/foreign rows get hidden = true.
|
|
UPDATE hardware.components SET slug='case-o11dxl', section='pc', slot='case', installed_at='2021-10-04', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/case-o11dxl/1.webp','/hardware/case-o11dxl/2.webp','/hardware/case-o11dxl/3.webp','/hardware/case-o11dxl/4.webp']::text[], image_sources=ARRAY['https://lian-li.com/wp-content/uploads/2020/11/O11D-XL_white_front.jpg','https://lian-li.com/wp-content/uploads/2020/11/O11D-XL_white_side45.jpg','https://lian-li.com/wp-content/uploads/2020/11/O11D-XL_white_side.jpg','https://m.media-amazon.com/images/I/61C8fINNthL._AC_SL1000_.jpg']::text[], url=coalesce(url, 'https://lian-li.com/product/pc-o11d-rog/') WHERE id=24;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='cpu-12900kf', section='pc', slot='cpu', installed_at='2021-12-23', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/cpu-12900kf/1.webp','/hardware/cpu-12900kf/2.webp']::text[], image_sources=ARRAY['https://m.media-amazon.com/images/I/51CUAct4KVL._AC_SL1000_.jpg','https://m.media-amazon.com/images/I/51TZr5s8OkL._AC_SL1057_.jpg']::text[], url=coalesce(url, 'https://www.intel.com/content/www/us/en/products/sku/134600/intel-core-i912900kf-processor-30m-cache-up-to-5-20-ghz/specifications.html') WHERE id=20;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='mb-z690a', section='pc', slot='motherboard', installed_at='2021-12-23', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/mb-z690a/1.webp','/hardware/mb-z690a/2.webp','/hardware/mb-z690a/3.webp']::text[], image_sources=ARRAY['https://storage-asset.msi.com/global/picture/product/product_163705377693ef948ad0d360a8ab6da624f664819e.webp','https://storage-asset.msi.com/global/picture/product/product_1637053776ec2f34081a469c724488e25ac6017811.webp','https://storage-asset.msi.com/global/picture/product/product_163532337099b51ebc934878850ada1bb0d1ecd256.webp']::text[], url=coalesce(url, 'https://www.msi.com/Motherboard/PRO-Z690-A-WIFI-DDR4') WHERE id=19;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='ram-vengeance', section='pc', slot='memory', installed_at='2021-12-10', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/ram-vengeance/1.webp','/hardware/ram-vengeance/2.webp','/hardware/ram-vengeance/3.webp','/hardware/ram-vengeance/4.webp']::text[], image_sources=ARRAY['https://res.cloudinary.com/corsair-pwa/image/upload/f_auto,q_auto,w_1600/products/Memory/CMW32GX4M4D3600C18/Gallery/Vengeance_RGB_Pro_01.png','https://res.cloudinary.com/corsair-pwa/image/upload/f_auto,q_auto,w_1600/products/Memory/CMW32GX4M4D3600C18/Gallery/Vengeance_RGB_Pro_02.png','https://res.cloudinary.com/corsair-pwa/image/upload/f_auto,q_auto,w_1600/products/Memory/CMW32GX4M4D3600C18/Gallery/Vengeance_RGB_Pro_03.png','https://res.cloudinary.com/corsair-pwa/image/upload/f_auto,q_auto,w_1600/products/Memory/CMW32GX4M4D3600C18/Gallery/Vengeance_RGB_Pro_04.png']::text[], url=coalesce(url, 'https://www.corsair.com/us/en/p/memory/cmw32gx4m4d3600c18/vengeance-rgb-pro-32gb-4x8gb-ddr4-dram-3600mhz-c18-memory-kit-black-cmw32gx4m4d3600c18') WHERE id=21;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='cooler-z73', section='pc', slot='cooler', installed_at='2021-12-10', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/cooler-z73/1.webp','/hardware/cooler-z73/2.webp','/hardware/cooler-z73/3.webp','/hardware/cooler-z73/4.webp']::text[], image_sources=ARRAY['https://web.archive.org/web/2022id_/https://www.datocms-assets.com/34299/1631128727-kraken-z73-rgb-black-keyshot.png','https://web.archive.org/web/2022id_/https://www.datocms-assets.com/34299/1631128741-kraken-z73-rgb-black-system1.png','https://web.archive.org/web/2022id_/https://www.datocms-assets.com/34299/1631128772-kraken-z73-rgb-black-top.png','https://web.archive.org/web/2022id_/https://www.datocms-assets.com/34299/1632169832-kraken-z73-rgb-black-radiator.png']::text[], url=coalesce(url, 'https://web.archive.org/web/2022/https://nzxt.com/product/kraken-z73-rgb') WHERE id=23;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='acc-nzxt-1700', section='pc', slot='cooler-mount', installed_at='2021-12-10', removed_at=NULL, usage='current', image_urls='{}'::text[], image_sources='{}'::text[], url=coalesce(url, NULL) WHERE id=22;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='gpu-7900xt', section='pc', slot='gpu', installed_at='2022-12-22', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/gpu-7900xt/1.webp']::text[], image_sources=ARRAY['https://static.gigabyte.com/StaticFile/Image/Global/868436ba12e23fc0d98e26322a618a2c/ProductRemoveBg/32810']::text[], url=coalesce(url, 'https://www.gigabyte.com/Graphics-Card/GV-R79XT-20GC-B') WHERE id=15;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='psu-rm850x', section='pc', slot='psu', installed_at='2022-12-24', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/psu-rm850x/1.webp','/hardware/psu-rm850x/2.webp','/hardware/psu-rm850x/3.webp']::text[], image_sources=ARRAY['https://res.cloudinary.com/corsair-pwa/image/upload/f_auto,q_auto,w_1600/products/Power-Supply-Units/base-rmx-2021-config/Gallery/RM850x_01.png','https://res.cloudinary.com/corsair-pwa/image/upload/f_auto,q_auto,w_1600/products/Power-Supply-Units/base-rmx-2021-config/Gallery/RM850x_02.png','https://res.cloudinary.com/corsair-pwa/image/upload/f_auto,q_auto,w_1600/products/Power-Supply-Units/base-rmx-2021-config/Gallery/RM850x_03.png']::text[], url=coalesce(url, 'https://www.corsair.com/us/en/p/psu/cp-9020200-na/rmx-series-rm850x-850-watt-80-plus-gold-certified-fully-modular-psu-cp-9020200-na') WHERE id=14;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='ssd-980', section='pc', slot='storage', installed_at='2022-11-13', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/ssd-980/1.webp','/hardware/ssd-980/2.webp','/hardware/ssd-980/3.webp']::text[], image_sources=ARRAY['https://m.media-amazon.com/images/I/419dpKuUuiL._AC_SL1109_.jpg','https://m.media-amazon.com/images/I/510vd1oMDZL._AC_SL1200_.jpg','https://m.media-amazon.com/images/I/61fdIjQtgEL._AC_SL1200_.jpg']::text[], url=coalesce(url, 'https://semiconductor.samsung.com/consumer-storage/internal-ssd/980/') WHERE id=16;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='fans-slinf', section='pc', slot='fans-case', installed_at='2026-03-03', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/fans-slinf/1.webp','/hardware/fans-slinf/2.webp','/hardware/fans-slinf/3.webp','/hardware/fans-slinf/4.webp']::text[], image_sources=ARRAY['https://m.media-amazon.com/images/I/619CatWyjBL._SL1500_.jpg','https://m.media-amazon.com/images/I/61lGLXNWqoL._SL1500_.jpg','https://m.media-amazon.com/images/I/61ZpoUb+SdL._SL1500_.jpg','https://lian-li.com/wp-content/uploads/2025/05/sl2-inf-w-pg-02.jpg']::text[], url=coalesce(url, 'https://lian-li.com/product/uni-fan-sl-inf-wireless/') WHERE id=13;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='light-neon-m5', section='pc', slot='lighting', installed_at='2026-03-03', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/light-neon-m5/1.webp','/hardware/light-neon-m5/2.webp','/hardware/light-neon-m5/3.webp']::text[], image_sources=ARRAY['https://m.media-amazon.com/images/I/51N8rVgWibL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/81PCZlv0PgL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/71QhOCduLWL._AC_SL1500_.jpg']::text[], url=coalesce(url, 'https://phanteks.com/product/neon-digital-rgb-led-m5/') WHERE id=10;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='acc-bcf', section='pc', slot='contact-frame', installed_at=NULL, removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/acc-bcf/1.webp','/hardware/acc-bcf/2.webp','/hardware/acc-bcf/3.webp']::text[], image_sources=ARRAY['https://www.thermalright.com/wp-content/uploads/2022/06/1-9.jpg','https://www.thermalright.com/wp-content/uploads/2022/06/2-7.jpg','https://www.thermalright.com/wp-content/uploads/2022/06/3-8.jpg']::text[], url=coalesce(url, 'https://www.thermalright.com/product/lga1700-bcf-black/') WHERE id=76;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='acc-kryonaut', section='pc', slot='thermal-paste', installed_at='2026-03-03', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/acc-kryonaut/1.webp','/hardware/acc-kryonaut/2.webp']::text[], image_sources=ARRAY['https://m.media-amazon.com/images/I/71lDzoaNkEL._SL1500_.jpg','https://m.media-amazon.com/images/I/61iYwVQJD+L._SL1500_.jpg']::text[], url=coalesce(url, 'https://www.thermal-grizzly.com/en/kryonaut/s-tg-k-001-rs') WHERE id=9;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='mon-g9', section='desk', slot='monitor', installed_at='2022-04-07', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/mon-g9/1.webp','/hardware/mon-g9/2.webp']::text[], image_sources=ARRAY['https://m.media-amazon.com/images/I/711HTxM8v2L._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/61231crcJsL._AC_SL1398_.jpg']::text[], url=coalesce(url, 'https://www.amazon.de/dp/B088HH6LW5') WHERE id=18;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='arm-ergotron', section='desk', slot='monitor-arm', installed_at='2022-06-20', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/arm-ergotron/1.webp','/hardware/arm-ergotron/2.webp']::text[], image_sources=ARRAY['https://m.media-amazon.com/images/I/61zfWuUa6IL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/71rk9JFuczL._AC_SL1500_.jpg']::text[], url=coalesce(url, 'https://www.ergotron.com/en-us/products/product-details/98-540-216') WHERE id=7;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='kb-alloy', section='desk', slot='keyboard', installed_at='2021-05-06', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/kb-alloy/1.webp','/hardware/kb-alloy/2.webp','/hardware/kb-alloy/3.webp']::text[], image_sources=ARRAY['https://m.media-amazon.com/images/I/61MjTWnX-+L._AC_SL1000_.jpg','https://m.media-amazon.com/images/I/71rk1KhPNKL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/61eOYDRynLL._AC_SL1500_.jpg']::text[], url=coalesce(url, 'https://row.hyperx.com/products/hyperx-alloy-origins-mechanical-gaming-keyboard') WHERE id=4;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='kb-pudding', section='desk', slot='keycaps', installed_at='2021-05-15', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/kb-pudding/1.webp','/hardware/kb-pudding/2.webp','/hardware/kb-pudding/3.webp']::text[], image_sources=ARRAY['https://m.media-amazon.com/images/I/61CYPEU-E-L._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/71TuqudaBRL._AC_SL1000_.jpg','https://m.media-amazon.com/images/I/81V0SI4NXKL._AC_SL1500_.jpg']::text[], url=coalesce(url, 'https://row.hyperx.com/products/hyperx-pudding-keycaps') WHERE id=3;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='kb-uwu', section='desk', slot='keypad', installed_at='2023-10-23', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/kb-uwu/1.webp','/hardware/kb-uwu/2.webp','/hardware/kb-uwu/3.webp','/hardware/kb-uwu/4.webp']::text[], image_sources=ARRAY['https://wooting-website.ams3.cdn.digitaloceanspaces.com/products/keyboards/UwU/configurator-images/uwu-stealth.jpg','https://wooting-website.ams3.cdn.digitaloceanspaces.com/products/cases/uwu-brass-case/UwU_Brass_case.webp','https://wooting-website.ams3.cdn.digitaloceanspaces.com/products/cases/uwu-brass-case/Brass_case_top_view.webp','https://wooting-website.ams3.cdn.digitaloceanspaces.com/products/keyboards/UwU/uwu-multiple-front.webp']::text[], url=coalesce(url, 'https://wooting.io/uwu') WHERE id=2;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='mouse-mxm3', section='desk', slot='mouse-work', installed_at='2021-12-21', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/mouse-mxm3/1.webp','/hardware/mouse-mxm3/2.webp','/hardware/mouse-mxm3/3.webp']::text[], image_sources=ARRAY['https://m.media-amazon.com/images/I/61cGVHDEj5S._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/61Rb7EPlvpL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/61BQr1EnpKL._AC_SL1500_.jpg']::text[], url=coalesce(url, 'https://www.logitech.com/en-us/products/mice/mx-master-3.910-005620.html') WHERE id=8;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='arm-ak35', section='audio', slot='mic-arm', installed_at='2025-10-23', removed_at=NULL, usage='current', image_urls=ARRAY['/hardware/arm-ak35/1.webp','/hardware/arm-ak35/2.webp','/hardware/arm-ak35/3.webp']::text[], image_sources=ARRAY['https://m.media-amazon.com/images/I/61I8KtMpsYL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/71roWtsJqCL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/71A2y+-Z-4L._AC_SL1500_.jpg']::text[], url=coalesce(url, 'https://www.amazon.de/dp/B01MZ99Y67') WHERE id=1;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='sim-t300', section='sim', slot='wheel', installed_at='2022-05-11', removed_at=NULL, usage='stored', image_urls=ARRAY['/hardware/sim-t300/1.webp','/hardware/sim-t300/2.webp','/hardware/sim-t300/3.webp']::text[], image_sources=ARRAY['https://m.media-amazon.com/images/I/71vf7FTHtAL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/81hzeAcdA7L._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/71rBrUnMPSL._AC_SL1500_.jpg']::text[], url=coalesce(url, 'https://www.thrustmaster.com/en-us/products/t300-rs-gt-edition/') WHERE id=6;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='sim-th8a', section='sim', slot='shifter', installed_at='2022-05-11', removed_at=NULL, usage='stored', image_urls=ARRAY['/hardware/sim-th8a/1.webp','/hardware/sim-th8a/2.webp','/hardware/sim-th8a/3.webp']::text[], image_sources=ARRAY['https://www.thrustmaster.com/wp-content/uploads/2021/09/P_List-TH8A-SHIFTER-add-on-1.png','https://www.thrustmaster.com/wp-content/uploads/2021/09/UTH_TH8A-add-on-SHIFTER-1.jpg','https://m.media-amazon.com/images/I/71QuLkYRE3L._SL1500_.jpg']::text[], url=coalesce(url, 'https://www.thrustmaster.com/en-us/products/th8a/') WHERE id=5;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='fans-slinf-3pack-b', section='pc', slot='fans-case', installed_at='2026-03-03', usage='current' WHERE id=12;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET slug='fans-slinf-1pack', section='pc', slot='fans-case', installed_at='2026-03-03', usage='current' WHERE id=11;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET verified=true, notes='Main keyboard (Stan, 2026-10-25). Paid iDEAL. A bol.com order for the same keyboard (2021-05-04) was cancelled and is not counted.' WHERE id=4;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET verified=true WHERE id=3;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET verified=true, model='MX Master 3 Graphite (work mouse)', notes='Work mouse (Stan, 2026-10-25); the G Pro Wireless is the main mouse.' WHERE id=8;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET status='spare', verified=true, notes=coalesce(notes,'') || ' Stan 2026-10-25: owned but stored, not set up.' WHERE id IN (5,6);
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET notes='Holds the Blue Snowball (Stan, 2026-10-25).' WHERE id=1;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET notes='Order ME101221000534 total EUR 493.80 (free shipping). Paid iDEAL (Knab). Black (RL-KRZ73-R1). Came with 3x NZXT Aer RGB 2 120mm stock radiator fans, still on the radiator (Stan 2026-10-25: no 140 mm Aer fans). As of 2026-10 the cooler is ~5 years old and the CPU idles/loads around 80-90 C (per Stan).' WHERE id=23;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET notes='Case fans. 7 SL-INF in total (3+3+1); exactly 7 Lian Li fans (Stan, 2026-10-25). Order total EUR 265.50, free shipping, paid by credit card, delivered 2026-03-03.' WHERE id=13;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET hidden=true, status='retired', notes=coalesce(notes,'') || ' HIDDEN 2026-10-25: Stan says there are no 140 mm Aer fans; the radiator has the Kraken''s 3 stock Aer RGB 2 120mm. This order was probably the Megekko return R221001735. Row kept for history.' WHERE id=17;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET hidden=true, status='retired', notes=coalesce(notes,'') || ' HIDDEN 2026-10-25: wrong placeholder. Stan has exactly 7 Lian Li fans (the SL-INF packs). Row kept for history.' WHERE id=75;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.devices SET hidden=true, label='Friend''s PC (2021)', notes='Budget build Stan bought and built for a friend/client at Megekko on 2021-01-31 (Ryzen 5 1600 / GTX 1650 / Q300L). Never Stan''s own PC (Stan, 2026-10-25), so it is hidden on /trackers/pc. Rows kept for history.' WHERE id=2;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.components SET hidden=true WHERE device_id=2;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.devices SET notes='Stan''s main PC: Lian Li O11 Dynamic XL ROG White, i9-12900KF, RX 7900 XT, 7 Lian Li UNI FAN SL-INF 120 Wireless around the case + the Kraken Z73''s 3 stock Aer RGB 2 120mm on the radiator. Dual-boots Arch (stan-arch) and Windows 11 + WSL2 (stan-win11). Desk peripherals and the Odyssey G9 are tracked here. Mostly bought at Megekko 2021-2022.' WHERE id=1;
|
|
--> statement-breakpoint
|
|
INSERT INTO hardware.components (device_id, category, brand, model, quantity, specs, status, verified, url, notes, source, slug, section, slot, installed_at, removed_at, usage, image_urls, image_sources) VALUES (1, 'fan', 'NZXT', 'Aer RGB 2 120mm Black (Kraken Z73 stock radiator fans)', 3, '{"rgb": true, "color": "black", "size_mm": 120, "mounted_on": "Kraken Z73 radiator", "included_with": "Kraken Z73 RGB"}'::jsonb, 'in_use', true, 'https://support.nzxt.com/hc/en-us/articles/37914228751899-Kraken-Z3-Series-Specs', 'Came in the box with the Kraken Z73 RGB (black); image is the official radiator+fans render.', 'user_statement', 'fans-kraken-stock', 'pc', 'fans-radiator', '2021-12-10', NULL, 'current', ARRAY['/hardware/fans-kraken-stock/1.webp']::text[], ARRAY['https://web.archive.org/web/2022id_/https://www.datocms-assets.com/34299/1632169832-kraken-z73-rgb-black-radiator.png']::text[]) ON CONFLICT (slug) DO NOTHING;
|
|
--> statement-breakpoint
|
|
INSERT INTO hardware.components (device_id, category, brand, model, quantity, specs, status, verified, url, notes, source, slug, section, slot, installed_at, removed_at, usage, image_urls, image_sources) VALUES (1, 'monitor', 'Acer', '1080p 144Hz monitor (model TBD)', 1, '{"refresh_hz": 144, "resolution": "1920x1080"}'::jsonb, 'retired', true, NULL, 'Owned long ago, dates unknown; replaced by the G9 at some point. Exact model unknown.', 'user_statement', 'mon-acer', 'desk', 'monitor', NULL, NULL, 'legacy-previous', '{}'::text[], '{}'::text[]) ON CONFLICT (slug) DO NOTHING;
|
|
--> statement-breakpoint
|
|
INSERT INTO hardware.components (device_id, category, brand, model, quantity, specs, status, verified, url, notes, source, slug, section, slot, installed_at, removed_at, usage, image_urls, image_sources) VALUES (1, 'mouse', 'Mad Catz', 'R.A.T. 9', 1, '{"type": "wireless gaming mouse"}'::jsonb, 'retired', true, 'https://www.newegg.com/global/uk-en/mad-catz-mcb437090001-02-1-r-a-t-9-usb-rf-wireless/p/N82E16826618018', 'Owned long ago, dates unknown. amazon.co.uk listing B00A72ZS4Y; colour Stan owned unknown.', 'user_statement', 'mouse-rat9', 'desk', 'mouse-gaming', NULL, NULL, 'legacy-previous', ARRAY['/hardware/mouse-rat9/1.webp','/hardware/mouse-rat9/2.webp','/hardware/mouse-rat9/3.webp']::text[], ARRAY['https://m.media-amazon.com/images/I/717Yp6X2wuL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/71K1PxsYoFL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/61qGrRhhxbL._AC_SL1500_.jpg']::text[]) ON CONFLICT (slug) DO NOTHING;
|
|
--> statement-breakpoint
|
|
INSERT INTO hardware.components (device_id, category, brand, model, quantity, specs, status, verified, url, notes, source, slug, section, slot, installed_at, removed_at, usage, image_urls, image_sources) VALUES (1, 'mouse', 'Logitech', 'G Pro HERO (wired)', 1, '{"type": "wired gaming mouse", "sensor": "HERO"}'::jsonb, 'retired', true, 'https://www.logitechg.com/en-au/products/gaming-mice/pro-hero.910-005442.html', 'Dates unknown.', 'user_statement', 'mouse-gpro-hero', 'desk', 'mouse-gaming', NULL, NULL, 'previous', ARRAY['/hardware/mouse-gpro-hero/1.webp','/hardware/mouse-gpro-hero/2.webp','/hardware/mouse-gpro-hero/3.webp']::text[], ARRAY['https://m.media-amazon.com/images/I/51l21Sg2joL._AC_SL1384_.jpg','https://m.media-amazon.com/images/I/51kKoLc0RyL._AC_SL1384_.jpg','https://m.media-amazon.com/images/I/51i2fRVG0JL._AC_SL1384_.jpg']::text[]) ON CONFLICT (slug) DO NOTHING;
|
|
--> statement-breakpoint
|
|
INSERT INTO hardware.components (device_id, category, brand, model, quantity, specs, status, verified, url, notes, source, slug, section, slot, installed_at, removed_at, usage, image_urls, image_sources) VALUES (1, 'mouse', 'Logitech', 'G Pro Wireless (main mouse)', 1, '{"type": "wireless gaming mouse", "sensor": "HERO 25K"}'::jsonb, 'in_use', true, 'https://www.logitechg.com/en-us/products/gaming-mice/pro-wireless-mouse.910-005270.html', 'Main gaming mouse (Stan, 2026-10-25). Sensitivity/DPI TBD; date unknown.', 'user_statement', 'mouse-gpro-wl', 'desk', 'mouse-gaming', NULL, NULL, 'current', ARRAY['/hardware/mouse-gpro-wl/1.webp','/hardware/mouse-gpro-wl/2.webp','/hardware/mouse-gpro-wl/3.webp']::text[], ARRAY['https://m.media-amazon.com/images/I/51ySu55JzAL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/71xHNVGJd6L._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/715znQLTHKL._AC_SL1500_.jpg']::text[]) ON CONFLICT (slug) DO NOTHING;
|
|
--> statement-breakpoint
|
|
INSERT INTO hardware.components (device_id, category, brand, model, quantity, specs, status, verified, url, notes, source, slug, section, slot, installed_at, removed_at, usage, image_urls, image_sources) VALUES (1, 'mousepad', 'Razer', 'Gigantus V2 Large', 1, '{"size_mm": "450x400x3", "surface": "soft cloth"}'::jsonb, 'in_use', true, 'https://www.razer.com/gaming-mouse-mats/razer-gigantus-v2', 'Install date unknown but recent (2025-2026).', 'user_statement', 'pad-razer', 'desk', 'mousepad', NULL, NULL, 'current', ARRAY['/hardware/pad-razer/1.webp','/hardware/pad-razer/2.webp','/hardware/pad-razer/3.webp']::text[], ARRAY['https://m.media-amazon.com/images/I/81hx6hPSijL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/81rnOSHnZlL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/71RFdpWxIpL._AC_SL1500_.jpg']::text[]) ON CONFLICT (slug) DO NOTHING;
|
|
--> statement-breakpoint
|
|
INSERT INTO hardware.components (device_id, category, brand, model, quantity, specs, status, verified, url, notes, source, slug, section, slot, installed_at, removed_at, usage, image_urls, image_sources) VALUES (1, 'webcam', 'Logitech', '1080p webcam (model TBD)', 1, '{"resolution": "1080p"}'::jsonb, 'in_use', true, NULL, 'Owned long ago, date unknown; model TBD.', 'user_statement', 'cam-logi', 'desk', 'webcam', NULL, NULL, 'legacy', '{}'::text[], '{}'::text[]) ON CONFLICT (slug) DO NOTHING;
|
|
--> statement-breakpoint
|
|
INSERT INTO hardware.components (device_id, category, brand, model, quantity, specs, status, verified, url, notes, source, slug, section, slot, installed_at, removed_at, usage, image_urls, image_sources) VALUES (1, 'chair', 'IKEA', 'Chair (model TBD)', 1, '{}'::jsonb, 'in_use', true, NULL, 'Owned long ago, date unknown; model TBD.', 'user_statement', 'chair-ikea', 'desk', 'chair', NULL, NULL, 'legacy', '{}'::text[], '{}'::text[]) ON CONFLICT (slug) DO NOTHING;
|
|
--> statement-breakpoint
|
|
INSERT INTO hardware.components (device_id, category, brand, model, quantity, specs, status, verified, url, notes, source, slug, section, slot, installed_at, removed_at, usage, image_urls, image_sources) VALUES (1, 'microphone', 'Blue', 'Snowball USB microphone', 1, '{"connection": "USB"}'::jsonb, 'in_use', true, 'https://www.logitechg.com/en-us/products/streaming-gear/snowball-usb-microphone.988-000070.html', 'Owned long ago, date unknown; images show the white version (Stan''s colour unknown).', 'user_statement', 'mic-snowball', 'audio', 'mic', NULL, NULL, 'legacy', ARRAY['/hardware/mic-snowball/1.webp','/hardware/mic-snowball/2.webp','/hardware/mic-snowball/3.webp']::text[], ARRAY['https://m.media-amazon.com/images/I/51DbHowQxmL._AC_SL1134_.jpg','https://m.media-amazon.com/images/I/51Uw3IiBR7L._AC_SL1434_.jpg','https://m.media-amazon.com/images/I/71Wkv6pufkL._AC_SL1500_.jpg']::text[]) ON CONFLICT (slug) DO NOTHING;
|
|
--> statement-breakpoint
|
|
INSERT INTO hardware.components (device_id, category, brand, model, quantity, specs, status, verified, url, notes, source, slug, section, slot, installed_at, removed_at, usage, image_urls, image_sources) VALUES (1, 'headset', 'Sony', 'WH-1000XM3', 1, '{"type": "wireless ANC headphones"}'::jsonb, 'in_use', true, 'https://www.sony.com/electronics/support/wireless-headphones-bluetooth-headphones/wh-1000xm3', 'Owned long ago, date unknown.', 'user_statement', 'hp-xm3', 'audio', 'headphones', NULL, NULL, 'legacy', ARRAY['/hardware/hp-xm3/1.webp','/hardware/hp-xm3/2.webp','/hardware/hp-xm3/3.webp']::text[], ARRAY['https://m.media-amazon.com/images/I/51mhf2-LjLL._AC_SL1200_.jpg','https://m.media-amazon.com/images/I/51DqcnxBoNL._AC_SL1200_.jpg','https://m.media-amazon.com/images/I/51v5xAsPMSL._AC_SL1200_.jpg']::text[]) ON CONFLICT (slug) DO NOTHING;
|
|
--> statement-breakpoint
|
|
INSERT INTO hardware.components (device_id, category, brand, model, quantity, specs, status, verified, url, notes, source, slug, section, slot, installed_at, removed_at, usage, image_urls, image_sources) VALUES (1, 'headset', 'Dell', 'Premier Wireless ANC Headset WL7024 (work-issued)', 1, '{"type": "wireless ANC headset"}'::jsonb, 'in_use', true, 'https://www.dell.com/en-us/shop/dell-premier-wireless-anc-headset-wl7024/apd/520-bbgn/audio', 'Work-issued (Cargill). Date unknown.', 'user_statement', 'hp-wl7024', 'audio', 'headset-work', NULL, NULL, 'work-issued', ARRAY['/hardware/hp-wl7024/1.webp','/hardware/hp-wl7024/2.webp','/hardware/hp-wl7024/3.webp']::text[], ARRAY['https://m.media-amazon.com/images/I/713XOzjmXVL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/61oBhKYbT7L._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/719VWqm3Q5L._AC_SL1500_.jpg']::text[]) ON CONFLICT (slug) DO NOTHING;
|
|
--> statement-breakpoint
|
|
INSERT INTO hardware.components (device_id, category, brand, model, quantity, specs, status, verified, url, notes, source, slug, section, slot, installed_at, removed_at, usage, image_urls, image_sources) VALUES (1, 'headset', NULL, 'IEMs (model TBD)', 1, '{"type": "in-ear monitors"}'::jsonb, 'in_use', true, NULL, 'Owned long ago, date unknown; model TBD, no images yet.', 'user_statement', 'iem-tbd', 'audio', 'iems', NULL, NULL, 'legacy', '{}'::text[], '{}'::text[]) ON CONFLICT (slug) DO NOTHING;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.devices SET installed_at='2026-10-24', removed_at=NULL, image_urls=ARRAY['/hardware/dev-ovh/1.webp']::text[], image_sources=ARRAY['https://www.ovhcloud.com/sites/default/files/styles/large_screens_1x/public/2024-11/rise-s_1200x800_transparent.png']::text[], url=coalesce(url, 'https://www.ovhcloud.com/en/bare-metal/rise/rise-s/') WHERE id=6;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.devices SET installed_at='2023-07-17', removed_at=NULL, image_urls=ARRAY['/hardware/dev-mbp/1.webp','/hardware/dev-mbp/2.webp','/hardware/dev-mbp/3.webp']::text[], image_sources=ARRAY['https://cdsassets.apple.com/live/SZLF0YNV/images/sp/111838_macbook-pro-2023-16in.png','https://m.media-amazon.com/images/I/61qTygx9BNL._AC_SL1500_.jpg','https://m.media-amazon.com/images/I/51zAOYaYsJL._AC_SL1500_.jpg']::text[], url=coalesce(url, 'https://support.apple.com/en-us/111838') WHERE id=8;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.devices SET installed_at='2026-10-19', removed_at=NULL, image_urls=ARRAY['/hardware/dev-pixel/1.webp','/hardware/dev-pixel/2.webp','/hardware/dev-pixel/3.webp']::text[], image_sources=ARRAY['https://lh3.googleusercontent.com/2njFzqo44n0xZAlrpvPuB0okDCafUhS9mUZk6E8Z0BHuJS6dvZ3TblSnhiWqxAALGtHm6UP3VaE65zQM4G8O9dPvqd_lKrN6Vx0=s1200','https://lh3.googleusercontent.com/pOHHSl1kjZ8XYeB53K6Kit2VVrxPuCavLKiRqcUdorde1GELNCHYmqlYyOWA_ZDjvbBM2fhAWg6fpc9C5NwTI8KkvkmoNnZB4fU=s1200','https://lh3.googleusercontent.com/5G3FCI9a3fiM_Lh6GHL6K2r4I3kcT4PSJmFNw0SBAbS8q1eZkihRK6zJm8R5nWsvKB_J2Pq_wt5UL5KV2LYtBg_8DVGYjotuhow=s1200']::text[], url=coalesce(url, 'https://store.google.com/product/pixel_11_pro') WHERE id=9;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.devices SET installed_at=NULL, removed_at='2026-10-19', image_urls=ARRAY['/hardware/dev-iphone/1.webp','/hardware/dev-iphone/2.webp']::text[], image_sources=ARRAY['https://cdsassets.apple.com/live/SZLF0YNV/images/sp/111846_sp875-sp876-iphone14-pro-promax.png','https://m.media-amazon.com/images/I/51uD1lmrV8L._AC_SL1000_.jpg']::text[], url=coalesce(url, 'https://support.apple.com/en-us/111846') WHERE id=10;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.devices SET installed_at=NULL, removed_at=NULL, image_urls=ARRAY['/hardware/dev-ipad/1.webp','/hardware/dev-ipad/2.webp']::text[], image_sources=ARRAY['https://cdsassets.apple.com/live/7WUAS350/images/tech-specs/ipad-air-11-inch-m2.png','https://cdsassets.apple.com/live/7WUAS350/images/tech-specs/ipad-air-13-inch-m2-portimage-1.png']::text[], url=coalesce(url, 'https://support.apple.com/en-us/119893') WHERE id=11;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.devices SET installed_at=NULL, removed_at=NULL, image_urls='{}'::text[], image_sources='{}'::text[], url=coalesce(url, NULL) WHERE id=12;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.devices SET installed_at=NULL, removed_at='2026-10-24', image_urls='{}'::text[], image_sources='{}'::text[], url=coalesce(url, NULL) WHERE id=7;
|
|
--> statement-breakpoint
|
|
UPDATE hardware.devices SET model='MacBook Pro 16" (M2 Pro, 1 TB)', specs='{"chip": "Apple M2 Pro", "screen_in": 16, "storage": "1 TB", "year": 2023}'::jsonb, purchase_date=coalesce(purchase_date, '2023-07-17'), notes='16-inch MacBook Pro, M2 Pro, 1 TB (Stan, 2026-10-25). An M5 Max MacBook Pro is planned.' WHERE id=8;
|