-
Notifications
You must be signed in to change notification settings - Fork 2
/
database.sql
126 lines (106 loc) · 3.4 KB
/
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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 01, 2012 at 04:51 PM
-- Server version: 5.5.25
-- PHP Version: 5.4.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `money`
--
-- --------------------------------------------------------
--
-- Table structure for table `accounts`
--
CREATE TABLE IF NOT EXISTS `accounts` (
`AccountID` int(11) NOT NULL AUTO_INCREMENT,
`UserID` int(11) NOT NULL,
`AccountName` varchar(100) NOT NULL,
`ReconciledTotal` float NOT NULL,
`Archived` tinyint(4) NOT NULL,
PRIMARY KEY (`AccountID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
-- --------------------------------------------------------
--
-- Table structure for table `labels`
--
CREATE TABLE IF NOT EXISTS `labels` (
`LabelID` int(11) NOT NULL AUTO_INCREMENT,
`LabelName` varchar(100) NOT NULL,
`UserID` int(11) NOT NULL,
PRIMARY KEY (`LabelID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `payments`
--
CREATE TABLE IF NOT EXISTS `payments` (
`PaymentID` int(11) NOT NULL AUTO_INCREMENT,
`UserID` int(11) NOT NULL,
`AccountID` int(11) NOT NULL,
`Timestamp` int(11) NOT NULL,
`PaymentName` varchar(100) NOT NULL,
`PaymentDesc` varchar(200) NOT NULL,
`PaymentAmount` float NOT NULL,
`PaymentType` varchar(100) NOT NULL,
`LabelID` int(11) NOT NULL,
`Reconciled` tinyint(1) NOT NULL,
`RepeatID` int(11) NOT NULL,
`Deleted` tinyint(4) NOT NULL,
`ToAccount` int(11) NOT NULL,
`PairedID` int(11) NOT NULL,
PRIMARY KEY (`PaymentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=464 ;
-- --------------------------------------------------------
--
-- Table structure for table `repeats`
--
CREATE TABLE IF NOT EXISTS `repeats` (
`RepeatID` int(11) NOT NULL AUTO_INCREMENT,
`Frequency` varchar(10) NOT NULL,
`Times` int(11) NOT NULL,
`ExpireTime` int(11) NOT NULL,
`UserID` int(11) NOT NULL,
`AccountID` int(11) NOT NULL,
`Timestamp` int(11) NOT NULL,
`PaymentName` varchar(100) NOT NULL,
`PaymentDesc` varchar(200) NOT NULL,
`PaymentAmount` float NOT NULL,
`PaymentType` varchar(100) NOT NULL,
`LabelID` int(11) NOT NULL,
`ToAccount` int(11) NOT NULL,
`PairedID` int(11) NOT NULL,
PRIMARY KEY (`RepeatID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=44 ;
-- --------------------------------------------------------
--
-- Table structure for table `sessions`
--
CREATE TABLE IF NOT EXISTS `sessions` (
`SessionID` int(11) NOT NULL AUTO_INCREMENT,
`SessionKey` varchar(64) NOT NULL,
`UserID` int(11) NOT NULL,
`SessionTimeout` int(11) NOT NULL,
`IP` varchar(40) NOT NULL,
PRIMARY KEY (`SessionID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=18 ;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`UserID` int(11) NOT NULL AUTO_INCREMENT,
`Email` varchar(100) NOT NULL,
`Password` varchar(64) NOT NULL,
`Salt` varchar(16) NOT NULL,
`Validated` tinyint(1) NOT NULL,
`ValidationKey` varchar(64) NOT NULL,
`ValidatedTimeout` int(11) NOT NULL,
`ResetKey` varchar(64) NOT NULL,
`ResetTimeout` int(11) NOT NULL,
`PrefCurrency` varchar(10) NOT NULL,
PRIMARY KEY (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;