-
Notifications
You must be signed in to change notification settings - Fork 1
/
database_schema.sql
85 lines (72 loc) · 2.63 KB
/
database_schema.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
-- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 14, 2014 at 08:15 PM
-- Server version: 5.6.11
-- PHP Version: 5.5.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
-- --------------------------------------------------------
--
-- Table structure for table `clients`
--
DROP TABLE IF EXISTS `clients`;
CREATE TABLE IF NOT EXISTS `clients` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`first_name` varchar(75) NOT NULL,
`last_name` varchar(75) NOT NULL,
`email` varchar(75) NOT NULL,
`phone` varchar(100) DEFAULT NULL,
`vteam_name` varchar(75) DEFAULT NULL,
`notes` text,
`billing_rate` float(5,2) unsigned NOT NULL,
`status` tinyint(1) unsigned NOT NULL DEFAULT '1',
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `invoices`
--
DROP TABLE IF EXISTS `invoices`;
CREATE TABLE IF NOT EXISTS `invoices` (
`id` int(20) unsigned NOT NULL AUTO_INCREMENT,
`client_id` int(11) unsigned NOT NULL,
`quickbooks_invoiceid` varchar(25) DEFAULT NULL,
`is_billable` tinyint(1) unsigned NOT NULL DEFAULT '1',
`client_notes` text,
`notes` text,
`payment_date` date DEFAULT NULL,
`payment_comment` varchar(255) DEFAULT NULL,
`status` enum('Draft','Paid','Cancelled','Unpaid') NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `invoice_items`
--
DROP TABLE IF EXISTS `invoice_items`;
CREATE TABLE IF NOT EXISTS `invoice_items` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
`invoice_id` int(20) unsigned NOT NULL,
`description` varchar(255) NOT NULL,
`start_date` date NOT NULL,
`completion_date` date NOT NULL,
`hours` int(5) unsigned NOT NULL,
`is_billable` tinyint(1) unsigned NOT NULL DEFAULT '1',
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;