CRM-12986 fix schema so required fields are required / not null
authoreileen <eileen@fuzion.co.nz>
Sun, 30 Jun 2013 08:33:50 +0000 (20:33 +1200)
committereileen <eileen@fuzion.co.nz>
Sun, 30 Jun 2013 08:38:57 +0000 (20:38 +1200)
CRM/Upgrade/Incremental/sql/4.4.alpha1.mysql.tpl
xml/schema/Event/Participant.xml

index e178d5a1f914a264293d12757e3c9d86ea17b7ec..3aeb42851281770093122115a21f7dccdee511d5 100644 (file)
@@ -69,3 +69,8 @@ VALUES
 -- CRM-12809
 ALTER TABLE `civicrm_custom_group`
   ADD COLUMN `is_reserved` tinyint(4) DEFAULT '0' COMMENT 'Is this a reserved Custom Group?';
+
+--CRM-12986 fix event_id & contact_id to NOT NULL fields on participant table
+ALTER TABLE `civicrm_participant`
+  CHANGE COLUMN `event_id` `event_id` INT(10) UNSIGNED NOT NULL,
+  CHANGE COLUMN `contact_id` `contact_id` INT(10) UNSIGNED NOT NULL;
index c5a9f54c353ff0bd64a029f746d7e9f95950c219..728bf474f43818500c8cddc40dfc36b31b37a15f 100644 (file)
@@ -28,7 +28,7 @@
       <title>Contact ID</title>
       <headerPattern>/contact(.?id)?/i</headerPattern>
       <import>true</import>
-      <default>0</default>
+      <required>true</required>
       <comment>FK to Contact ID</comment>
       <add>1.7</add>
   </field>
@@ -44,7 +44,7 @@
       <title>Event</title>
       <import>true</import>
       <headerPattern>/event id$/i</headerPattern>
-      <default>0</default>
+      <required>true</required>
       <comment>FK to Event ID</comment>
       <add>1.7</add>
   </field>