At first create schema (myType.xsd for example) which defines new properties:
<?xml version="1.0"?>
<xs:schema targetNamespace="http://www.nuxeo.org/ecm/schemas/cf-client/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="organization" type="xs:string"/>
<xs:element name="phone" type="xs:string"/>
<xs:element name="expired" type="xs:date"/>
</xs:schema>
Then define the type extension where you refer to the newly created schema:
<?xml version="1.0"?>
<component name="my.project.nuxeo.types">
<require>org.nuxeo.ecm.core.CoreExtensions</require>
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
<schema name="myType" prefix="mt" src="schema/myType.xsd"/>
</extension>
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
<doctype name="MyType" extends="Document">
<schema name="myType"/>
<schema name="common" />
<schema name="dublincore" />
<schema name="uid" />
<schema name="file"/>
<schema name="files" />
<facet name="Commentable"/>
<facet name="NXTag"/>
</doctype>
</extension>
</component>
Note: You can also:
Then register the new type extension from the previous step in the MANIFEST.MF file:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Bundle-Vendor: my.project.nuxeo
Bundle-Name: my-project-nuxeo-core
Bundle-SymbolicName: my.project.nuxeo.my-project-nuxeo-core;singleton=true
Bundle-Version: 1.0.0
Nuxeo-Component: OSGI-INF/types.xml
Zip all these files into jar archive with this structure:
my-project-nuxeo-core.jar
├── META-INF
│ └── MANIFEST.MF
├── OSGI-INF
│ └── types.xml
└── schema
└── myType.xsd
And copy that result jar archive into nxserver/bundles directory of your Nuxeo installation. Restart Nuxeo and it will automatically update DB structure accordingly.
You can find more info in Nuxeo documentation - for example here: https://doc.nuxeo.com/nxdoc/data-modeling/