-- +--------------------------------------------------------------------+
-- | 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
--
-- /*******************************************************
-- *
-- * Clean up the existing tables - this section generated from drop.tpl
-- *
-- *******************************************************/



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

-- /*******************************************************
-- *
-- * civicrm_afform_submission
-- *
-- * Recorded form submissions
-- *
-- *******************************************************/
CREATE TABLE `civicrm_afform_submission` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique Submission ID',
  `contact_id` int unsigned,
  `afform_name` varchar(255) COMMENT 'Name of submitted afform',
  `data` text COMMENT 'IDs of saved entities',
  `submission_date` timestamp DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  CONSTRAINT FK_civicrm_afform_submission_contact_id FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL
)
ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
