FinanceFerret/2.0/sql/trx: Difference between revisions
< FinanceFerret | 2.0 | sql
Jump to navigation
Jump to search
(Created page with "==About== * '''purpose''': base transaction, to which transaction parts are attached * '''rules''': a transaction: ** must have exactly one source part ** must have exactly on...") |
(moved trx_part rules to trx_part table page) |
||
| Line 1: | Line 1: | ||
==About== | ==About== | ||
* '''purpose''': base transaction, to which transaction parts are attached | * '''purpose''': base transaction, to which transaction parts ({{l/same|trx_part}} are attached | ||
==SQL== | ==SQL== | ||
<source lang=mysql>CREATE TABLE ` | <source lang=mysql>CREATE TABLE `trx` ( | ||
`ID` INT(4) NOT NULL auto_increment, | `ID` INT(4) NOT NULL auto_increment, | ||
`ID_Type` INT(4) default NULL COMMENT "[trx_type].ID", | `ID_Type` INT(4) default NULL COMMENT "[trx_type].ID", | ||
`Amount` DECIMAL(9,2) default NULL COMMENT " | `Amount` DECIMAL(9,2) default NULL COMMENT "total amount of money transferred", | ||
`Voided` tinyint(1) default FALSE COMMENT "transaction voided", | `Voided` tinyint(1) default FALSE COMMENT "transaction voided", | ||
`IsApprox` tinyint(1) default NULL COMMENT "exact amount of transaction is not known yet", PRIMARY KEY (`ID`), | `IsApprox` tinyint(1) default NULL COMMENT "exact amount of transaction is not known yet", PRIMARY KEY (`ID`), | ||
KEY `Acct` (`ID_Acct`) | KEY `Acct` (`ID_Acct`) | ||
) ENGINE=InnoDB;</source> | ) ENGINE=InnoDB;</source> | ||
Revision as of 13:12, 24 August 2019
About
- purpose: base transaction, to which transaction parts (trx_part are attached
SQL
CREATE TABLE `trx` (
`ID` INT(4) NOT NULL auto_increment,
`ID_Type` INT(4) default NULL COMMENT "[trx_type].ID",
`Amount` DECIMAL(9,2) default NULL COMMENT "total amount of money transferred",
`Voided` tinyint(1) default FALSE COMMENT "transaction voided",
`IsApprox` tinyint(1) default NULL COMMENT "exact amount of transaction is not known yet", PRIMARY KEY (`ID`),
KEY `Acct` (`ID_Acct`)
) ENGINE=InnoDB;