Upgrade Indoors Database (Indoors)

Summary

Upgrades an existing Indoors workspace by creating or updating schema items to conform to the latest ArcGIS Indoors Information Model schema.

Usage

  • Use this tool to update the schema of an existing Indoors workspace created using the Create Indoors Database, Create Indoor Dataset, and Create Indoor Network Dataset tools, to conform to the current version of the Indoors model.

  • This tool upgrades an existing Indoors workspace by adding feature classes, fields, domains, and domain values and changing the nullable property of certain fields.

    Note:

    This tool modifies the input database. Create a backup copy of the Indoors workspace if you want a previous version for reference.

  • If the database is an enterprise geodatabase with data shared as branch versioned feature services, any services in use must be stopped and have schema locking disabled before the tool can modify the schema of the geodatabase.

  • In ArcGIS Enterprise, any services using a shared instance type—such as the Reservations layer—must be deleted before the tool can modify the schema.

  • This tool searches for schema items by matching item names with the Indoors model. Any schema items that are not found will be created as a new item. If you have renamed any feature classes, tables, fields, and domains in the input Indoors workspace, they must be reverted to the original name to be upgraded by the tool.

  • This tool does not remove schema items or custom attribute rules in the input Indoors workspace.

  • The input Indoors database must already exist and cannot be empty.

  • If the database contains an indoor network dataset, this tool will create the LEVEL_ID field in the Pathways and PrelimPathways feature classes if the field is not present. The tool will also attempt to populate LEVEL_ID field values for any Pathways and PrelimPathways features that are inside buildings.

    Note:

    If the input database is an enterprise geodatabase that contains a built network dataset as a result of using the Build Network tool, the LEVEL_ID field can be added by the Upgrade Indoors Database tool but will not be populated with values due to locks on participating feature classes that are used to build the network.

    To populate Pathways and PrelimPathways features with LEVEL_ID values, run this tool the next time you update the network before building the network.

  • If the database contains Indoors validation attribute rules, you can run the tool with the Upgrade Attribute Rules parameter checked to update existing or create missing attribute rules from the latest version of the Indoors model. This is the default.

  • Security attribute rules associated with the Reservations feature class will be created or updated during the upgrade process for workspace reservation security purposes.

    Note:

    When upgrading an enterprise geodatabase, branch versioning must be enabled if the Upgrade Attribute Rules parameter is checked.

    Global IDs and editor tracking will be enabled if Upgrade Attribute Rules is checked and the database has existing Indoors attribute rules.

  • You can generate a report of changes the tool will make to an Indoors workspace without modifying the existing schema by specifying Generate Schema Change Report for the Upgrade Indoors Database parameter value. When this option is specified, the following occurs:

    • The input Indoors workspace is not updated.
    • A text file report is generated, documenting a list of feature classes, tables, fields, domains, domain values, and attribute rules that will be added or upgraded.
    • The generated report documents information if the state of the input Indoors geodatabase prevents any schema item from being added. For example, it may not be possible to add a field to a feature class if an existing field has the same name but a different data type.
    • The generated report documents information if the state of the database causes the tool to perform a partial upgrade. For example, if a non-nullable field must be added to a feature class as part of the upgrade process, the field will be added as nullable rather than non-nullable if the feature class contains existing data.
    • An exclusive schema lock on the database is not acquired when running the tool with the Upgrade Indoors Database parameter set to Generate Schema Change Report.
  • After running the tool, refresh content at the database level to see changes to tables and at the dataset level to see changes to feature classes.

  • If the existing Indoors workspace is an enterprise geodatabase with feature classes in a dataset shared in branch versioned feature services, any new feature classes created in the same dataset by this tool will also need to be enabled with branch versioning.

Parameters

LabelExplanationData Type
Input Indoors Database

The existing geodatabase that contains Indoors model schema items created by the Create Indoors Database or Create Indoors Dataset tools. This parameter accepts a file geodatabase or an enterprise geodatabase.

Workspace
Upgrade Attribute Rules
(Optional)

Specifies whether validation attribute rules will be created or updated for use in Indoors quality control workflows. If the input Indoors database is an enterprise geodatabase, branch versioning must be enabled.

  • Checked—Validation attribute rules will be created or overwritten with the latest version of attribute rules from the Indoors model if the database has existing Indoors attribute rules. This is the default.
  • Unchecked—Validation attribute rules will not be created or updated.
Boolean
Upgrade Indoors Database
(Optional)

Specifies whether the input Indoors database will be upgraded with schema changes or a report will be generated with potential schema changes that will be made to the input Indoors database.

  • Upgrade DatabaseThe input Indoors database will be upgraded. This is the default.
  • Generate Schema Change ReportA text file report will be generated with a list of schema changes that will be made to the input Indoors database during the upgrade process and any issues that would result in the schema not being updated. The input Indoors database will not be upgraded.
String

Derived Output

LabelExplanationData Type
Upgraded Indoors Database

The Indoors geodatabase that is upgraded by the tool.

Workspace

arcpy.indoors.UpgradeIndoorsDatabase(in_workspace, {upgrade_attribute_rules}, {upgrade_indoors_database})
NameExplanationData Type
in_workspace

The existing geodatabase that contains Indoors model schema items created by the Create Indoors Database or Create Indoors Dataset tools. This parameter accepts a file geodatabase or an enterprise geodatabase.

Workspace
upgrade_attribute_rules
(Optional)

Specifies whether validation attribute rules will be created or updated for use in Indoors quality control workflows. If the input Indoors database is an enterprise geodatabase, branch versioning must be enabled.

  • UPGRADE_ATTRIBUTE_RULESValidation attribute rules will be created or updated if there are existing Indoors attribute rules in the input database. This is the default.
  • NO_UPGRADE_ATTRIBUTE_RULESValidation attribute rules will not be created or updated.
Boolean
upgrade_indoors_database
(Optional)

Specifies whether the input Indoors database will be upgraded with schema changes or a report will be generated with potential schema changes that will be made to the input Indoors database.

  • UPGRADE_DATABASEThe input Indoors database will be upgraded. This is the default.
  • GENERATE_REPORTA text file report will be generated with a list of schema changes that will be made to the input Indoors database during the upgrade process and any issues that would result in the schema not being updated. The input Indoors database will not be upgraded.
String

Derived Output

NameExplanationData Type
out_workspace

The Indoors geodatabase that is upgraded by the tool.

Workspace

Code sample

UpgradeIndoorsDatabase example 1 (Python window)

The following Python window script demonstrates how to use the UpgradeIndoorsDatabase function in immediate mode.

arcpy.indoors.UpgradeIndoorsDatabase('C:\SampleGDB\Indoors_2_5.gdb','UPGRADE_ATTRIBUTE_RULES','UPGRADE_DATABASE')
UpgradeIndoorsDatabase example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the UpgradeIndoorsDatabase function.

import arcpy
arcpy.indoors.UpgradeIndoorsDatabase()

#Set the input Indoors database and parameter settings.
input_workspace = 'C:\SampleGDB\Indoors_2_5.gdb'
upgrade_attribute_rules = True
execute_mode = 'UPGRADE_DATABASE'

#Run the tool with selected parameters.
arcpy.indoors.UpgradeIndoorsDatabase(input_workspace, upgrade_attribute_rules, execute_mode)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Requires ArcGIS Indoors Pro or ArcGIS Indoors Maps
  • Standard: Requires ArcGIS Indoors Pro or ArcGIS Indoors Maps
  • Advanced: Requires ArcGIS Indoors Pro or ArcGIS Indoors Maps

Related topics