| 1 | <table> |
| 2 | <base>CRM/Cxn</base> |
| 3 | <class>Cxn</class> |
| 4 | <name>civicrm_cxn</name> |
| 5 | <add>4.6</add> |
| 6 | <field> |
| 7 | <name>id</name> |
| 8 | <title>Connection ID</title> |
| 9 | <type>int unsigned</type> |
| 10 | <required>true</required> |
| 11 | <comment>Connection ID</comment> |
| 12 | <add>4.6</add> |
| 13 | </field> |
| 14 | <primaryKey> |
| 15 | <name>id</name> |
| 16 | <autoincrement>false</autoincrement> |
| 17 | </primaryKey> |
| 18 | |
| 19 | <!-- Application identification --> |
| 20 | |
| 21 | <field> |
| 22 | <name>app_guid</name> |
| 23 | <title>Application GUID</title> |
| 24 | <type>varchar</type> |
| 25 | <length>128</length> |
| 26 | <comment>Application GUID</comment> |
| 27 | <add>4.6</add> |
| 28 | </field> |
| 29 | <index> |
| 30 | <name>UI_appid</name> |
| 31 | <fieldName>app_guid</fieldName> |
| 32 | <unique>true</unique> |
| 33 | <add>4.6</add> |
| 34 | </index> |
| 35 | <field> |
| 36 | <name>app_meta</name> |
| 37 | <title>Application Metadata (JSON)</title> |
| 38 | <type>text</type> |
| 39 | <comment>Application Metadata (JSON)</comment> |
| 40 | <add>4.6</add> |
| 41 | </field> |
| 42 | |
| 43 | <!-- Connection details --> |
| 44 | |
| 45 | <field> |
| 46 | <name>cxn_guid</name> |
| 47 | <title>Connection GUID</title> |
| 48 | <type>varchar</type> |
| 49 | <length>128</length> |
| 50 | <comment>Connection GUID</comment> |
| 51 | <add>4.6</add> |
| 52 | </field> |
| 53 | <index> |
| 54 | <name>UI_keypair_cxnid</name> |
| 55 | <fieldName>cxn_guid</fieldName> |
| 56 | <unique>true</unique> |
| 57 | <add>4.6</add> |
| 58 | </index> |
| 59 | <field> |
| 60 | <name>secret</name> |
| 61 | <type>text</type> |
| 62 | <comment>Shared secret</comment> |
| 63 | <add>4.6</add> |
| 64 | </field> |
| 65 | <field> |
| 66 | <name>perm</name> |
| 67 | <type>text</type> |
| 68 | <comment>Permissions approved for the service (JSON)</comment> |
| 69 | <add>4.6</add> |
| 70 | </field> |
| 71 | <field> |
| 72 | <name>options</name> |
| 73 | <type>text</type> |
| 74 | <comment>Options for the service (JSON)</comment> |
| 75 | <add>4.6</add> |
| 76 | </field> |
| 77 | |
| 78 | <!-- Connection lifecycle --> |
| 79 | |
| 80 | <field> |
| 81 | <name>is_active</name> |
| 82 | <title>Is Active</title> |
| 83 | <type>boolean</type> |
| 84 | <default>1</default> |
| 85 | <comment>Is connection currently enabled?</comment> |
| 86 | <add>4.6</add> |
| 87 | </field> |
| 88 | <field> |
| 89 | <name>created_date</name> |
| 90 | <type>timestamp</type> |
| 91 | <comment>When was the connection was created.</comment> |
| 92 | <required>false</required> |
| 93 | <default>NULL</default> |
| 94 | <add>4.6</add> |
| 95 | </field> |
| 96 | <field> |
| 97 | <name>modified_date</name> |
| 98 | <type>timestamp</type> |
| 99 | <comment>When the connection was created or modified.</comment> |
| 100 | <required>false</required> |
| 101 | <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default> |
| 102 | <add>4.6</add> |
| 103 | </field> |
| 104 | <field> |
| 105 | <name>fetched_date</name> |
| 106 | <type>timestamp</type> |
| 107 | <comment>The last time the application metadata was fetched.</comment> |
| 108 | <required>false</required> |
| 109 | <default>NULL</default> |
| 110 | <add>4.6</add> |
| 111 | </field> |
| 112 | </table> |