FinanceFerret/2.0/sql/Trx Types: Difference between revisions
< FinanceFerret | 2.0 | sql
Jump to navigation
Jump to search
(extracted from main page) |
m (Woozle moved page FinanceFerret/tables/Trx Types to FinanceFerret/2.0/sql/Trx Types without leaving a redirect: renumbering - 1.0 is Access version) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
* The name of this table should be changed later because "Types" is a keyword and confuses the syntax display parser; also, spaces in table names are usable but generally should be avoided | * The name of this table should be changed later because "Types" is a keyword and confuses the syntax display parser; also, spaces in table names are usable but generally should be avoided | ||
==SQL== | ==SQL== | ||
< | <syntaxhighlight lang=mysql>DROP TABLE IF EXISTS `Trx Types`; | ||
CREATE TABLE `Trx Types` ( | CREATE TABLE `Trx Types` ( | ||
`Code` varchar(50) NOT NULL COMMENT "identifying abbreviation", | `Code` varchar(50) NOT NULL COMMENT "identifying abbreviation", | ||
Line 13: | Line 13: | ||
`IsEquity` BOOL NOT NULL DEFAULT FALSE COMMENT "TRUE = affects equity only; FALSE = regular transaction", | `IsEquity` BOOL NOT NULL DEFAULT FALSE COMMENT "TRUE = affects equity only; FALSE = regular transaction", | ||
PRIMARY KEY (`Code`) | PRIMARY KEY (`Code`) | ||
) ENGINE=MyISAM DEFAULT;</ | ) ENGINE=MyISAM DEFAULT;</syntaxhighlight> | ||
Latest revision as of 13:49, 2 March 2020
About
- Purpose: organizes different types of transactions
- Notes:
- Transaction amounts are generally entered as positive numbers; the direction in which the amount is moving is determined by the transaction type.
Future
- The name of this table should be changed later because "Types" is a keyword and confuses the syntax display parser; also, spaces in table names are usable but generally should be avoided
SQL
DROP TABLE IF EXISTS `Trx Types`;
CREATE TABLE `Trx Types` (
`Code` varchar(50) NOT NULL COMMENT "identifying abbreviation",
`Descr` varchar(50) default NULL COMMENT "description",
`IsDebit` BOOL NOT NULL DEFAULT FALSE COMMENT "TRUE = debits from source account; FALSE = credits to source account",
`IsEquity` BOOL NOT NULL DEFAULT FALSE COMMENT "TRUE = affects equity only; FALSE = regular transaction",
PRIMARY KEY (`Code`)
) ENGINE=MyISAM DEFAULT;