~singpolyma/dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH jmp-schemas v3] Add schema for tel_inventory #320

Details
Message ID
<20230918193740.503350-1-amolith@secluded.site>
DKIM signature
missing
Download raw message
Patch: +42 -0
Signed-off-by: Amolith <amolith@secluded.site>
---
 deploy/tel_inventory.sql | 18 ++++++++++++++++++
 revert/tel_inventory.sql |  7 +++++++
 sqitch.plan              |  2 ++
 verify/tel_inventory.sql | 15 +++++++++++++++
 4 files changed, 42 insertions(+)
 create mode 100644 deploy/tel_inventory.sql
 create mode 100644 revert/tel_inventory.sql
 create mode 100644 verify/tel_inventory.sql

diff --git a/deploy/tel_inventory.sql b/deploy/tel_inventory.sql
new file mode 100644
index 0000000..76fc583
--- /dev/null
+++ b/deploy/tel_inventory.sql
@@ -0,0 +1,18 @@
-- Deploy jmp:tel_inventory to pg

BEGIN;

CREATE TABLE tel_inventory (
       tel                TEXT       PRIMARY KEY,
       locality           TEXT       NOT  NULL,
       region             TEXT       NOT  NULL,
       bandwidth_site_id  TEXT       NOT  NULL,
       premium_price      NUMERIC    NOT  NULL   DEFAULT  0,
       available_after    TIMESTAMP  NOT  NULL   DEFAULT  NOW(),
       purchased_at       TIMESTAMP  NOT  NULL   DEFAULT  NOW(),
);

CREATE INDEX ON tel_inventory (locality, available_after);
CREATE INDEX ON tel_inventory (region, available_after);

COMMIT;
diff --git a/revert/tel_inventory.sql b/revert/tel_inventory.sql
new file mode 100644
index 0000000..708b9c4
--- /dev/null
+++ b/revert/tel_inventory.sql
@@ -0,0 +1,7 @@
-- Revert jmp:tel_inventory from pg

BEGIN;

DROP TABLE tel_inventory;

COMMIT;
diff --git a/sqitch.plan b/sqitch.plan
index 20c9330..e415ef5 100644
--- a/sqitch.plan
+++ b/sqitch.plan
@@ -60,3 +60,5 @@ cdr_with_charge_ignoring_failed_noanswer [cdr_with_charge] 2023-03-28T21:35:43Z

customer_plans_with_pending [plan_log customer_plans parent_customer_id plan_log_with_range] 2023-05-03T15:05:21Z Stephen Paul Weber,,, <singpolyma@singpolyma-beefy> # Add pending boolean to the customer_plans view
@2023123 2023-05-03T15:20:20Z Stephen Paul Weber,,, <singpolyma@singpolyma-beefy> # Deploy customer_plans.pending

tel_inventory 2023-09-18T17:54:30Z Amolith <amolith@secluded.site> # Add schema for tel inventory system
diff --git a/verify/tel_inventory.sql b/verify/tel_inventory.sql
new file mode 100644
index 0000000..15a05bc
--- /dev/null
+++ b/verify/tel_inventory.sql
@@ -0,0 +1,15 @@
-- Verify jmp:tel_inventory on pg

BEGIN;

SELECT
    tel,
    locality,
    region,
    bandwidth_site_id,
    premium_price,
    available_after,
    purchased_at
FROM tel_inventory;

ROLLBACK;
-- 
2.42.0

[jmp-schemas/patches/debian-stable.yml] build failed

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CVMAQ0UBGTMP.CE98S2TQHPXY@cirno2>
In-Reply-To
<20230918193740.503350-1-amolith@secluded.site> (view parent)
DKIM signature
missing
Download raw message
jmp-schemas/patches/debian-stable.yml: FAILED in 31s

[Add schema for tel_inventory #320][0] v3 from [Amolith][1]

[0]: https://lists.sr.ht/~singpolyma/dev/patches/44849
[1]: amolith@secluded.site

✗ #1059458 FAILED jmp-schemas/patches/debian-stable.yml https://builds.sr.ht/~singpolyma/job/1059458
Reply to thread Export thread (mbox)