2018-08-11 11:33:32 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS `civicrm_grant_budget` (
|
|
|
|
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Primary ID',
|
|
|
|
`financial_type_id` int(10) UNSIGNED NOT NULL COMMENT 'FK to Financial Type.',
|
|
|
|
`fiscal_year` int(10) UNSIGNED NOT NULL COMMENT 'Fiscal Year',
|
|
|
|
`budget` decimal(20,2) DEFAULT '0.00' COMMENT 'Grant annual budget',
|
2019-08-19 21:16:11 +00:00
|
|
|
`note` varchar(255) DEFAULT NULL COMMENT 'Note',
|
|
|
|
`is_reserved`, tinyint(4) DEFAULT 0 COMMENT 'Is this grant budget locked?',
|
2018-08-11 11:33:32 +00:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `FK_civicrm_grant_budget_financial_type_id` (`financial_type_id`),
|
|
|
|
UNIQUE KEY `UI_financial_type_id_fiscal_year` (`financial_type_id`,`fiscal_year`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Constraints for table `civicrm_grant_budget`
|
|
|
|
--
|
|
|
|
ALTER TABLE `civicrm_grant_budget`
|
|
|
|
ADD CONSTRAINT `FK_civicrm_grant_budget_financial_type_id` FOREIGN KEY (`financial_type_id`) REFERENCES `civicrm_financial_type` (`id`) ON DELETE CASCADE;
|