aboutsummaryrefslogtreecommitdiffstats
path: root/sql/serenitasdb.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/serenitasdb.sql')
-rw-r--r--sql/serenitasdb.sql11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/serenitasdb.sql b/sql/serenitasdb.sql
index d501018e..1e49ed7b 100644
--- a/sql/serenitasdb.sql
+++ b/sql/serenitasdb.sql
@@ -1283,3 +1283,14 @@ CREATE TABLE hyg_vol_data (
CONSTRAINT hyg_vol_data_pkey PRIMARY KEY (date)
);
+CREATE TYPE option_type AS ENUM('C', 'P');
+
+CREATE TABLE hyg_option_quotes (
+ quote_id integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
+ "date" date NOT NULL,
+ "expiry" date NOT NULL,
+ strike numeric(3, 1) NOT NULL,
+ option_type option_type NOT NULL,
+ price float NOT NULL,
+ UNIQUE (date, expiry, strike, option_type)
+);