CRM-13497 - Add html type to schema xml
[civicrm-core.git] / xml / schema / Core / Note.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>Note</class>
6 <name>civicrm_note</name>
7 <comment>Notes can be linked to any object in the application.</comment>
8 <add>1.1</add>
9 <log>true</log>
10 <field>
11 <name>id</name>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>Note ID</comment>
15 <add>1.1</add>
16 </field>
17 <primaryKey>
18 <name>id</name>
19 <autoincrement>true</autoincrement>
20 </primaryKey>
21 <field>
22 <name>entity_table</name>
23 <type>varchar</type>
24 <length>64</length>
25 <required>true</required>
26 <comment>Name of table where item being referenced is stored.</comment>
27 <add>1.1</add>
28 </field>
29 <field>
30 <name>entity_id</name>
31 <type>int unsigned</type>
32 <required>true</required>
33 <comment>Foreign key to the referenced item.</comment>
34 <add>1.1</add>
35 </field>
36 <dynamicForeignKey>
37 <idColumn>entity_id</idColumn>
38 <typeColumn>entity_table</typeColumn>
39 <add>1.1</add>
40 </dynamicForeignKey>
41 <index>
42 <name>index_entity</name>
43 <fieldName>entity_table</fieldName>
44 <fieldName>entity_id</fieldName>
45 <add>1.1</add>
46 </index>
47 <field>
48 <name>note</name>
49 <type>text</type>
50 <comment>Note and/or Comment.</comment>
51 <html>
52 <type>TextArea</type>
53 </html>
54
55 <rows>4</rows>
56 <cols>60</cols>
57 <import>true</import>
58 <headerPattern>/Note|Comment/i</headerPattern>
59 <dataPattern>//</dataPattern>
60 <add>1.1</add>
61 </field>
62 <field>
63 <name>contact_id</name>
64 <type>int unsigned</type>
65 <comment>FK to Contact ID creator</comment>
66 <add>1.1</add>
67 </field>
68 <foreignKey>
69 <name>contact_id</name>
70 <table>civicrm_contact</table>
71 <key>id</key>
72 <add>1.1</add>
73 <onDelete>SET NULL</onDelete>
74 </foreignKey>
75 <field>
76 <name>modified_date</name>
77 <type>date</type>
78 <comment>When was this note last modified/edited</comment>
79 <add>1.1</add>
80 </field>
81 <field>
82 <name>subject</name>
83 <type>varchar</type>
84 <length>255</length>
85 <comment>subject of note description</comment>
86 <add>1.5</add>
87 </field>
88 <field>
89 <name>privacy</name>
90 <type>varchar</type>
91 <length>255</length>
92 <comment>Foreign Key to Note Privacy Level (which is an option value pair and hence an implicit FK)</comment>
93 <add>3.3</add>
94 </field>
95 </table>