From dbbf7d6c6c8b0a2da1b8cea6ae13a2a7de8bb98d Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 22 Oct 2025 21:34:46 -0400 Subject: [PATCH] create tables necessary to expand targt price list --- tables/core_target.ms.sql | 16 ++++++++++++++++ tables/option_sequence.ms.sql | 7 +++++++ tables/option_sequence.pg.sql | 7 +++++++ 3 files changed, 30 insertions(+) create mode 100644 tables/core_target.ms.sql create mode 100644 tables/option_sequence.ms.sql create mode 100644 tables/option_sequence.pg.sql diff --git a/tables/core_target.ms.sql b/tables/core_target.ms.sql new file mode 100644 index 0000000..f483e2d --- /dev/null +++ b/tables/core_target.ms.sql @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS pricing.pricing.core_target; + +CREATE TABLE pricing.pricing.core_target ( + compset VARCHAR(MAX) NOT NULL, + stlc VARCHAR(30) NOT NULL, + floor NUMERIC(20,5) NOT NULL, + options VARCHAR(MAX) NOT NULL, + PRIMARY KEY (stlc) +); + +CREATE SCHEMA import; + +DROP TABLE IF EXISTS pricing.import.core_target; + +-- CREATE TABLE pricing.import.core_target AS (SELECT * FROM pricing.pricing.core_target); +SELECT * INTO pricing.import.core_target FROM pricing.pricing.core_target; \ No newline at end of file diff --git a/tables/option_sequence.ms.sql b/tables/option_sequence.ms.sql new file mode 100644 index 0000000..42f2732 --- /dev/null +++ b/tables/option_sequence.ms.sql @@ -0,0 +1,7 @@ +CREATE TABLE pricing.pricing.option_sequence ( + entity varchar(30) NOT NULL, + seq int NOT NULL, + func varchar(30) NOT NULL, + "domain" varchar(30) NOT NULL, + CONSTRAINT option_sequence_pkey PRIMARY KEY (entity) +); \ No newline at end of file diff --git a/tables/option_sequence.pg.sql b/tables/option_sequence.pg.sql new file mode 100644 index 0000000..ef85e3e --- /dev/null +++ b/tables/option_sequence.pg.sql @@ -0,0 +1,7 @@ +CREATE TABLE option_sequence ( + entity text NOT NULL, + seq int4 NOT NULL, + func text NOT NULL, + "domain" text NOT NULL, + CONSTRAINT option_sequence_pkey PRIMARY KEY (entity) +);