Freeze historical datasets and qualify backtest instrument identities
This commit is contained in:
parent
63c3856797
commit
d6b09eb635
43 changed files with 2249 additions and 1230 deletions
7
database/postgres/init/12-historical-datasets.sql
Normal file
7
database/postgres/init/12-historical-datasets.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- Content-addressed execution inputs. No provider history is rewritten or removed.
|
||||
CREATE TABLE IF NOT EXISTS backtest_datasets (
|
||||
hash TEXT PRIMARY KEY CHECK (hash ~ '^[a-f0-9]{64}$'),
|
||||
payload JSONB NOT NULL,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
ALTER TABLE runs ADD COLUMN IF NOT EXISTS dataset_hash TEXT REFERENCES backtest_datasets(hash);
|
||||
Loading…
Add table
Add a link
Reference in a new issue