code: public Object execute(final Map<Object, Object> iArgs) {
      if (type == null)
        throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet");
  
      final ODatabaseRecord database = getDatabase();
      final OClassImpl sourceClass = (OClassImpl) database.getMetadata().getSchema().getClass(className);
      if (sourceClass == null)
        throw new OCommandExecutionException("Source class '" + className + "' not found");
  
      OPropertyImpl prop = (OPropertyImpl) sourceClass.getProperty(fieldName);
      if (prop != null)
        throw new OCommandExecutionException("Property '" + className + "." + fieldName
            + "' already exists. Remove it before to retry.");
  
      // CREATE THE PROPERTY
      OClass linkedClass = null;
      OType linkedType = null;
      if (linked != null) {
        // FIRST SEARCH BETWEEN CLASSES
        linkedClass = database.getMetadata().getSchema().getClass(linked);
  
        if (linkedClass == null)
          // NOT FOUND: SEARCH BETWEEN TYPES
          linkedType = OType.valueOf(linked.toUpperCase(Locale.ENGLISH));
      }
  
      // CREATE IT LOCALLY
      prop = sourceClass.addPropertyInternal(fieldName, type, linkedType, linkedClass);
      sourceClass.saveInternal();
  
      return sourceClass.properties().size();
    }
docs: Execute the CREATE PROPERTY.