WorkFerret/tables/rate: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
(+isLineItem)
(PerHour can be NULL)
Line 4: Line 4:
** '''2010-01-30''' changed isActive from BOOL to BIT(1) because that's what "boolean" apparently exports as
** '''2010-01-30''' changed isActive from BOOL to BIT(1) because that's what "boolean" apparently exports as
** '''2010-03-05''' added isLineItem so that purchases on same day can still be listed separately
** '''2010-03-05''' added isLineItem so that purchases on same day can still be listed separately
** '''2010-03-11''' Changed PerHour so it could be NULL -- some "rates" are for non-rate based types of work, e.g. purchases
* '''Fields''':
* '''Fields''':
** '''ID_Proj''' designates the outermost project for this rate; rate can also be used in sub-projects of this project, but not in parent projects
** '''ID_Proj''' designates the outermost project for this rate; rate can also be used in sub-projects of this project, but not in parent projects
Line 9: Line 10:
<mysql>DROP TABLE IF EXISTS `rate`;
<mysql>DROP TABLE IF EXISTS `rate`;
CREATE TABLE  `rate` (
CREATE TABLE  `rate` (
   `ID`        INT(4)       NOT NULL AUTO_INCREMENT,
   `ID`        INT(4)           NOT NULL AUTO_INCREMENT,
   `ID_Proj`    INT(4)   DEFAULT NULL COMMENT "Project in which this rate can be used",
   `ID_Proj`    INT(4)       DEFAULT NULL COMMENT "Project in which this rate can be used",
   `Name`      VARCHAR(63) NOT NULL COMMENT "brief name for rate (for lists)",
   `Name`      VARCHAR(63)     NOT NULL COMMENT "brief name for rate (for lists)",
   `PerHour`    DECIMAL(9,2) NOT NULL COMMENT "cost per hour",
   `PerHour`    DECIMAL(9,2) DEFAULT NULL COMMENT "cost per hour",
   `isActive`  BIT(1)   DEFAULT FALSE COMMENT "TRUE = still in use; FALSE = only use in history",
   `isActive`  BIT(1)     DEFAULT FALSE COMMENT "TRUE = still in use; FALSE = only use in history",
   `isLineItem` BIT(1)   DEFAULT FALSE COMMENT "TRUE = don't consolidate this session by date",
   `isLineItem` BIT(1)     DEFAULT FALSE COMMENT "TRUE = don't consolidate this session by date",
   PRIMARY KEY(`ID`)
   PRIMARY KEY(`ID`)
) ENGINE=MyISAM;</mysql>
) ENGINE=MyISAM;</mysql>

Revision as of 02:16, 12 March 2010

About

  • History:
    • 2010-01-29 Adapted from MS Access version
    • 2010-01-30 changed isActive from BOOL to BIT(1) because that's what "boolean" apparently exports as
    • 2010-03-05 added isLineItem so that purchases on same day can still be listed separately
    • 2010-03-11 Changed PerHour so it could be NULL -- some "rates" are for non-rate based types of work, e.g. purchases
  • Fields:
    • ID_Proj designates the outermost project for this rate; rate can also be used in sub-projects of this project, but not in parent projects

SQL

<mysql>DROP TABLE IF EXISTS `rate`; CREATE TABLE `rate` (

 `ID`         INT(4)           NOT NULL AUTO_INCREMENT,
 `ID_Proj`    INT(4)       DEFAULT NULL COMMENT "Project in which this rate can be used",
 `Name`       VARCHAR(63)      NOT NULL COMMENT "brief name for rate (for lists)",
 `PerHour`    DECIMAL(9,2) DEFAULT NULL COMMENT "cost per hour",
 `isActive`   BIT(1)      DEFAULT FALSE COMMENT "TRUE = still in use; FALSE = only use in history",
 `isLineItem` BIT(1)      DEFAULT FALSE COMMENT "TRUE = don't consolidate this session by date",
  PRIMARY KEY(`ID`)

) ENGINE=MyISAM;</mysql>