-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC. All rights reserved.                        |
-- |                                                                    |
-- | This work is published under the GNU AGPLv3 license with some      |
-- | permitted exceptions and without any warranty. For full license    |
-- | and copyright information, see https://civicrm.org/licensing       |
-- +--------------------------------------------------------------------+
--
-- Generated from schema.tpl
-- DO NOT EDIT.  Generated by CRM_Core_CodeGen
-- 

-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC. All rights reserved.                        |
-- |                                                                    |
-- | This work is published under the GNU AGPLv3 license with some      |
-- | permitted exceptions and without any warranty. For full license    |
-- | and copyright information, see https://civicrm.org/licensing       |
-- +--------------------------------------------------------------------+
--
-- Generated from drop.tpl
-- DO NOT EDIT.  Generated by CRM_Core_CodeGen
--
-- /*******************************************************
-- *
-- * Clean up the existing tables
-- *
-- *******************************************************/



-- /*******************************************************
-- *
-- * Create new tables
-- *
-- *******************************************************/

-- /*******************************************************
-- *
-- * civicrm_inventoryfield
-- *
-- * FIXME
-- *
-- *******************************************************/
CREATE TABLE `civicrm_inventoryfield` (


     `id` int unsigned NOT NULL AUTO_INCREMENT  COMMENT 'Unique Inventoryfield ID',
     `custom_field_id` int unsigned    COMMENT 'FK to civicrm_custom_field.id',
     `limit_per` int unsigned   DEFAULT 0 ,
     `limit_per_amount` int unsigned   DEFAULT 1  
,
        PRIMARY KEY (`id`)
 
 
,          CONSTRAINT FK_civicrm_inventoryfield_custom_field_id FOREIGN KEY (`custom_field_id`) REFERENCES `civicrm_custom_field`(`id`) ON DELETE CASCADE  
)    ;

 