Merge pull request #21186 from demeritcowboy/multiint
[civicrm-core.git] / ext / afform / core / sql / auto_install.sql
1 -- +--------------------------------------------------------------------+
2 -- | Copyright CiviCRM LLC. All rights reserved. |
3 -- | |
4 -- | This work is published under the GNU AGPLv3 license with some |
5 -- | permitted exceptions and without any warranty. For full license |
6 -- | and copyright information, see https://civicrm.org/licensing |
7 -- +--------------------------------------------------------------------+
8 --
9 -- Generated from schema.tpl
10 -- DO NOT EDIT. Generated by CRM_Core_CodeGen
11 --
12 -- /*******************************************************
13 -- *
14 -- * Clean up the existing tables - this section generated from drop.tpl
15 -- *
16 -- *******************************************************/
17
18 SET FOREIGN_KEY_CHECKS=0;
19
20 DROP TABLE IF EXISTS `civicrm_afform_submission`;
21
22 SET FOREIGN_KEY_CHECKS=1;
23 -- /*******************************************************
24 -- *
25 -- * Create new tables
26 -- *
27 -- *******************************************************/
28
29 -- /*******************************************************
30 -- *
31 -- * civicrm_afform_submission
32 -- *
33 -- * Recorded form submissions
34 -- *
35 -- *******************************************************/
36 CREATE TABLE `civicrm_afform_submission` (
37 `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique Submission ID',
38 `contact_id` int unsigned,
39 `afform_name` varchar(255) COMMENT 'Name of submitted afform',
40 `data` text COMMENT 'IDs of saved entities',
41 `submission_date` timestamp DEFAULT CURRENT_TIMESTAMP,
42 PRIMARY KEY (`id`),
43 CONSTRAINT FK_civicrm_afform_submission_contact_id FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL
44 )
45 ENGINE=InnoDB ROW_FORMAT=DYNAMIC;