convert to using a civix-generated entity
This commit is contained in:
@ -1,17 +1,95 @@
|
||||
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',
|
||||
`note` varchar(255) DEFAULT NULL COMMENT 'Note',
|
||||
`is_reserved`, tinyint(4) DEFAULT 0 COMMENT 'Is this grant budget locked?',
|
||||
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;
|
||||
-- +--------------------------------------------------------------------+
|
||||
-- | CiviCRM version 5 |
|
||||
-- +--------------------------------------------------------------------+
|
||||
-- | Copyright CiviCRM LLC (c) 2004-2019 |
|
||||
-- +--------------------------------------------------------------------+
|
||||
-- | This file is a part of CiviCRM. |
|
||||
-- | |
|
||||
-- | CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
-- | under the terms of the GNU Affero General Public License |
|
||||
-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
-- | |
|
||||
-- | CiviCRM is distributed in the hope that it will be useful, but |
|
||||
-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
-- | See the GNU Affero General Public License for more details. |
|
||||
-- | |
|
||||
-- | You should have received a copy of the GNU Affero General Public |
|
||||
-- | License and the CiviCRM Licensing Exception along |
|
||||
-- | with this program; if not, contact CiviCRM LLC |
|
||||
-- | at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
-- | GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
-- +--------------------------------------------------------------------+
|
||||
--
|
||||
-- Generated from schema.tpl
|
||||
-- DO NOT EDIT. Generated by CRM_Core_CodeGen
|
||||
--
|
||||
|
||||
|
||||
-- +--------------------------------------------------------------------+
|
||||
-- | CiviCRM version 5 |
|
||||
-- +--------------------------------------------------------------------+
|
||||
-- | Copyright CiviCRM LLC (c) 2004-2019 |
|
||||
-- +--------------------------------------------------------------------+
|
||||
-- | This file is a part of CiviCRM. |
|
||||
-- | |
|
||||
-- | CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
-- | under the terms of the GNU Affero General Public License |
|
||||
-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
-- | |
|
||||
-- | CiviCRM is distributed in the hope that it will be useful, but |
|
||||
-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
-- | See the GNU Affero General Public License for more details. |
|
||||
-- | |
|
||||
-- | You should have received a copy of the GNU Affero General Public |
|
||||
-- | License and the CiviCRM Licensing Exception along |
|
||||
-- | with this program; if not, contact CiviCRM LLC |
|
||||
-- | at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
-- | GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
-- +--------------------------------------------------------------------+
|
||||
--
|
||||
-- Constraints for table `civicrm_grant_budget`
|
||||
-- Generated from drop.tpl
|
||||
-- DO NOT EDIT. Generated by CRM_Core_CodeGen
|
||||
--
|
||||
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;
|
||||
-- /*******************************************************
|
||||
-- *
|
||||
-- * Clean up the exisiting tables
|
||||
-- *
|
||||
-- *******************************************************/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
DROP TABLE IF EXISTS `civicrm_grant_budget`;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
-- /*******************************************************
|
||||
-- *
|
||||
-- * Create new tables
|
||||
-- *
|
||||
-- *******************************************************/
|
||||
|
||||
-- /*******************************************************
|
||||
-- *
|
||||
-- * civicrm_grant_budget
|
||||
-- *
|
||||
-- * FIXME
|
||||
-- *
|
||||
-- *******************************************************/
|
||||
CREATE TABLE `civicrm_grant_budget` (
|
||||
|
||||
|
||||
`id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ScholarshipBudget ID',
|
||||
`financial_type_id` int unsigned NOT NULL COMMENT 'FK to Financial Type',
|
||||
`fiscal_year` int unsigned NOT NULL COMMENT 'Fiscal year',
|
||||
`budget` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT 'Scholarship Annual Budget'
|
||||
,
|
||||
PRIMARY KEY (`id`)
|
||||
|
||||
|
||||
, CONSTRAINT FK_civicrm_grant_budget_financial_type_id FOREIGN KEY (`financial_type_id`) REFERENCES `civicrm_financial_type`(`id`)
|
||||
) ;
|
||||
|
||||
|
||||
|
38
sql/auto_uninstall.sql
Normal file
38
sql/auto_uninstall.sql
Normal file
@ -0,0 +1,38 @@
|
||||
-- +--------------------------------------------------------------------+
|
||||
-- | CiviCRM version 5 |
|
||||
-- +--------------------------------------------------------------------+
|
||||
-- | Copyright CiviCRM LLC (c) 2004-2019 |
|
||||
-- +--------------------------------------------------------------------+
|
||||
-- | This file is a part of CiviCRM. |
|
||||
-- | |
|
||||
-- | CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
-- | under the terms of the GNU Affero General Public License |
|
||||
-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
-- | |
|
||||
-- | CiviCRM is distributed in the hope that it will be useful, but |
|
||||
-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
-- | See the GNU Affero General Public License for more details. |
|
||||
-- | |
|
||||
-- | You should have received a copy of the GNU Affero General Public |
|
||||
-- | License and the CiviCRM Licensing Exception along |
|
||||
-- | with this program; if not, contact CiviCRM LLC |
|
||||
-- | at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
-- | GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
-- +--------------------------------------------------------------------+
|
||||
--
|
||||
-- Generated from drop.tpl
|
||||
-- DO NOT EDIT. Generated by CRM_Core_CodeGen
|
||||
--
|
||||
-- /*******************************************************
|
||||
-- *
|
||||
-- * Clean up the exisiting tables
|
||||
-- *
|
||||
-- *******************************************************/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
DROP TABLE IF EXISTS `civicrm_grant_budget`;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
Reference in New Issue
Block a user