CloudExpression`
CloudExpression`

MigrateLegacyCloudExpression

MigrateLegacyCloudExpression[ce]

migrates a given legacy CloudExpression to the new format.

Details and Options

  • In Wolfram Cloud release 1.60, the CloudExpression format was changed and cloud expressions created before then need to be migrated to the new format.
  • The value stored in the CloudExpression is not modified in the process.
  • The values of the options PartProtection and Permissions are preserved by the migration.
  • Named cloud expressions are migrated in place, meaning the process is transparent.
  • Anonymous cloud expressions are migrated to a new anonymous CloudExpression with a new UUID.
  • The migration process renames the legacy cloud expression by appending "_backup" to its name, but does not delete it.
  • The migration produces a backup file in $TemporaryDirectory containing the expression stored in the CloudExpression.
  • MigrateLegacyCloudExpression returns a Success object if it successfully migrates the CloudExpression, or a Failure object.
  • MigrateLegacyCloudExpression allows the following options:
  • "EnsureSameQ"Truewhether to ensure original and migrated values are SameQ
    "KeepBackups"Truewhether to keep backups produced during the migration
    "MigrateFailureObject"Falsewhether to perform the migration even if the expression is a failure object
    "UseDefaultOptionOnFailure"Truewhether to ignore and replace failure option values with their default settings
  • With "EnsureSameQ" set to False, the original expression is not compared to the migrated one using the function SameQ.
  • With "UseDefaultOptionOnFailure" set to True, options are reset to their default values if their values cannot be retrieved.
  • Setting "MigrateFailureObject" to True allows the migration of cloud expressions whose content is a single Failure object. This setting should not be used otherwise, as it prevents the function from detecting errors while retrieving the expression to migrate.

Examples

Basic Examples  (1)

The existing CloudExpression["API/form"] was created in the old format:

Reading its value results in a failure because it is in the old format:

Migrate it to the new format:

Retrieve the expression:

A backup file has been created in $TemporaryDirectory:

Wolfram Research (2021), MigrateLegacyCloudExpression, Wolfram Language function, https://reference.wolfram.com/language/CloudExpression/ref/MigrateLegacyCloudExpression.html.

Text

Wolfram Research (2021), MigrateLegacyCloudExpression, Wolfram Language function, https://reference.wolfram.com/language/CloudExpression/ref/MigrateLegacyCloudExpression.html.

CMS

Wolfram Language. 2021. "MigrateLegacyCloudExpression." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/CloudExpression/ref/MigrateLegacyCloudExpression.html.

APA

Wolfram Language. (2021). MigrateLegacyCloudExpression. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/CloudExpression/ref/MigrateLegacyCloudExpression.html

BibTeX

@misc{reference.wolfram_2024_migratelegacycloudexpression, author="Wolfram Research", title="{MigrateLegacyCloudExpression}", year="2021", howpublished="\url{https://reference.wolfram.com/language/CloudExpression/ref/MigrateLegacyCloudExpression.html}", note=[Accessed: 20-May-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_migratelegacycloudexpression, organization={Wolfram Research}, title={MigrateLegacyCloudExpression}, year={2021}, url={https://reference.wolfram.com/language/CloudExpression/ref/MigrateLegacyCloudExpression.html}, note=[Accessed: 20-May-2024 ]}