A deploy/tel_inventory.sql => deploy/tel_inventory.sql +17 -0
@@ 0,0 1,17 @@
+-- Deploy jmp:tel_inventory to pg
+
+BEGIN;
+
+CREATE TABLE tel_inventory (
+ tel TEXT PRIMARY KEY,
+ locality TEXT NOT NULL,
+ region TEXT NOT NULL,
+ bandwidth_account_id TEXT NOT NULL,
+ premium_price NUMERIC NOT NULL DEFAULT 0,
+ available_after TIMESTAMP NOT NULL DEFAULT LOCALTIMESTAMP
+);
+
+CREATE INDEX ON tel_inventory (locality, available_after);
+CREATE INDEX ON tel_inventory (region, available_after);
+
+COMMIT;
A revert/tel_inventory.sql => revert/tel_inventory.sql +7 -0
@@ 0,0 1,7 @@
+-- Revert jmp:tel_inventory from pg
+
+BEGIN;
+
+DROP TABLE tel_inventory;
+
+COMMIT;
M sqitch.plan => sqitch.plan +2 -0
@@ 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
A verify/tel_inventory.sql => verify/tel_inventory.sql +14 -0
@@ 0,0 1,14 @@
+-- Verify jmp:tel_inventory on pg
+
+BEGIN;
+
+SELECT
+ tel,
+ locality,
+ region,
+ bandwidth_account_id,
+ premium_price,
+ available_after
+FROM tel_inventory;
+
+ROLLBACK;