File: beancounter_schema_mysql.txt

package info (click to toggle)
beancounter 0.8.8
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 360 kB
  • ctags: 142
  • sloc: perl: 2,592; sh: 744; makefile: 144
file content (108 lines) | stat: -rw-r--r-- 2,602 bytes parent folder | download | duplicates (4)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
-- MySQL dump 9.09
--
-- Host: localhost    Database: beancounter
-- ------------------------------------------------------
-- Server version	4.0.16-log

--
-- Table structure for table `beancounter`
--

CREATE TABLE beancounter (
  version varchar(12) NOT NULL default '',
  data_last_updated datetime default NULL
) TYPE=MyISAM;

--
-- Table structure for table `cash`
--

CREATE TABLE cash (
  name varchar(16) NOT NULL default '',
  value float default NULL,
  currency varchar(12) default NULL,
  type varchar(12) default NULL,
  owner varchar(16) default NULL,
  cost float default NULL,
  date date default NULL,
  UNIQUE KEY cash_pkey (name,type,owner,date)
) TYPE=MyISAM;

--
-- Table structure for table `fxprices`
--

CREATE TABLE fxprices (
  currency varchar(12) NOT NULL default '',
  date date default NULL,
  previous_close float default NULL,
  day_open float default NULL,
  day_low float default NULL,
  day_high float default NULL,
  day_close float default NULL,
  day_change float default NULL,
  UNIQUE KEY fxprices_pkey (currency,date)
) TYPE=MyISAM;

--
-- Table structure for table `indices`
--

CREATE TABLE indices (
  symbol varchar(12) NOT NULL default '',
  stockindex varchar(12) NOT NULL default ''
) TYPE=MyISAM;

--
-- Table structure for table `portfolio`
--

CREATE TABLE portfolio (
  symbol varchar(16) NOT NULL default '',
  shares float default NULL,
  currency varchar(12) default NULL,
  type varchar(16) default NULL,
  owner varchar(16) default NULL,
  cost float default NULL,
  date date default NULL,
  UNIQUE KEY portfolio_pkey (symbol,owner,date)
) TYPE=MyISAM;

--
-- Table structure for table `stockinfo`
--

CREATE TABLE stockinfo (
  symbol varchar(12) NOT NULL default '',
  name varchar(64) NOT NULL default '',
  exchange varchar(16) NOT NULL default '',
  capitalisation float default NULL,
  low_52weeks float default NULL,
  high_52weeks float default NULL,
  earnings float default NULL,
  dividend float default NULL,
  p_e_ratio float default NULL,
  avg_volume int(11) default NULL,
  active tinyint(1) default '1',
  PRIMARY KEY  (symbol)
) TYPE=MyISAM;

--
-- Table structure for table `stockprices`
--

CREATE TABLE stockprices (
  symbol varchar(12) NOT NULL default '',
  date date default NULL,
  previous_close float default NULL,
  day_open float default NULL,
  day_low float default NULL,
  day_high float default NULL,
  day_close float default NULL,
  day_change float default NULL,
  bid float default NULL,
  ask float default NULL,
  volume int(11) default NULL,
  UNIQUE KEY stockprices_pkey (symbol,date)
) TYPE=MyISAM;