From 30c6e0b0f46447766e5924489d247db889b397ed Mon Sep 17 00:00:00 2001 From: abijah Date: Thu, 4 Jun 2009 03:48:35 +0000 Subject: [PATCH] Forgot to save the file before the last checkin. Added the possibility of a 'credits' table, but I'll probably be wiping this out moving forward. git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@68 97e9348a-65ac-dc4b-aefc-98561f571b83 --- db/schema.sql | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/db/schema.sql b/db/schema.sql index d32a099..52d4f6b 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -945,6 +945,66 @@ CREATE TABLE `pmgr_payments` ( +-- ###################################################################### +-- ###################################################################### +-- ###################################################################### +-- ###################################################################### +-- ###################################################################### +-- ###################################################################### +-- ###################################################################### +-- ###################################################################### +-- ###################################################################### +-- ## +-- ## CREDITS +-- ## + + +-- ---------------------------------------------------------------------- +-- ---------------------------------------------------------------------- +-- TABLE pmgr_credit_types + +-- DROP TABLE IF EXISTS `pmgr_credit_types`; +-- CREATE TABLE `pmgr_credit_types` ( +-- `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + +-- `name` VARCHAR(80) NOT NULL, +-- `comment` VARCHAR(255) DEFAULT NULL, +-- `account_id` INT(10) UNSIGNED NOT NULL, -- quickbooks tracking + +-- PRIMARY KEY (`id`) +-- ) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- LOCK TABLES `pmgr_credit_types` WRITE; +-- INSERT INTO `pmgr_credit_types` (`id`, `name`, `account_id`) +-- VALUES +-- (1, 'Security Deposit', 0), +-- (2, 'Rent', 0), +-- (3, 'Late Credit', 0); +-- UNLOCK TABLES; + + +-- ---------------------------------------------------------------------- +-- ---------------------------------------------------------------------- +-- TABLE pmgr_credits + +DROP TABLE IF EXISTS `pmgr_credits`; +CREATE TABLE `pmgr_credits` ( + `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + + -- `credit_type_id` INT(10) UNSIGNED NOT NULL, + `lease_id` INT(10) UNSIGNED NOT NULL, + `credit_date` DATE NOT NULL, + `credit_to_date` DATE DEFAULT NULL, + `due_date` DATE DEFAULT NULL, + `amount` FLOAT(12,2) NOT NULL, + `tax` FLOAT(12,2) NOT NULL, + `total` FLOAT(12,2) NOT NULL, + `comment` VARCHAR(255) DEFAULT NULL, + + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + -- ###################################################################### -- ###################################################################### -- ######################################################################