feat: DB-Schema (candles, backtest_runs), Migration, CandleStore
This commit is contained in:
18
drizzle/0000_nifty_brood.sql
Normal file
18
drizzle/0000_nifty_brood.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
CREATE TABLE "backtest_runs" (
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"kind" text NOT NULL,
|
||||
"config" jsonb NOT NULL,
|
||||
"result" jsonb NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "candles" (
|
||||
"pair" varchar(16) NOT NULL,
|
||||
"ts" timestamp with time zone NOT NULL,
|
||||
"open" double precision NOT NULL,
|
||||
"high" double precision NOT NULL,
|
||||
"low" double precision NOT NULL,
|
||||
"close" double precision NOT NULL,
|
||||
"volume" double precision NOT NULL,
|
||||
CONSTRAINT "candles_pair_ts_pk" PRIMARY KEY("pair","ts")
|
||||
);
|
||||
Reference in New Issue
Block a user