-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdatabase.sql
32 lines (30 loc) · 910 Bytes
/
database.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CREATE TABLE jobs (
id INT UNSIGNED auto_increment PRIMARY KEY,
status ENUM('idle', 'processing', 'error', 'done'),
worker VARCHAR(15),
strategy VARCHAR(30),
version INT UNSIGNED,
asset CHAR(6),
year INT UNSIGNED,
timeframe CHAR(3),
params TEXT,
message VARCHAR(255),
execution_time INT UNSIGNED,
last_update DATETIME
) engine=InnoDB default charset latin1;
CREATE TABLE results (
job_id INT UNSIGNED,
session ENUM('all', 'sydney', 'tokyo', 'london', 'new_york'),
orders INT UNSIGNED,
winning_ratio DOUBLE UNSIGNED,
net_profit DOUBLE,
average_gain DOUBLE,
average_loss DOUBLE,
profit_factor DOUBLE,
PRIMARY KEY (job_id, session)
) engine=InnoDB default charset latin1;
CREATE TABLE trading_cost (
asset CHAR(6) PRIMARY KEY,
cost DOUBLE UNSIGNED,
pip_value DOUBLE UNSIGNED
) engine=InnoDB default charset latin1;