If I need to add a small integer field to a service, I usually do so using the REST services directory's admin page. In case you haven't used this before, you can do this:
- On the service's item page, look for the "URL" section in the lower right and click the launch button. This should open a simple HTML page with a title of "Your_Service_Name (FeatureServer)".
- Under the Layers list, click the layer you want to add the field to, this will open a new page.
- From here, click the Admin link in the upper right. This will open a new page with a different-coloured header.
- From here, click on the Add to Definition link at the bottom this will give you a new page with a large text box that has a bunch of JSON in it.
- "Select all" on the text box's contents and delete it.
- Enter something like this (replacing names and aliases as necessary) and click the "Add to Layer Definition" at the bottom:
{"fields": [{
"name" : "MyNewField",
"type" : "esriFieldTypeSmallInteger",
"alias": "My New Field",
"nullable": true,
"editable" : true,
"visible" : true
}]}
You should get a page saying the operation was successful and your new field should be on the layer.