ExportXMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Unknown
    • 5.12.0
    • Affects Version/s: None
    • None
    • Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      php artisan mongodb:encryption:create-collection takes one collection name as an argument. The encryptedFieldsMap can declare several collections, and there is no way to see which ones are not created yet, or to create them in one command.

      Requested behavior* Interactive mode: when no collection argument is given and the terminal is interactive, ask which collections to create.

      ** Offer the collections of encryptedFieldsMap that do not exist yet.
      ** Allow selecting one or several.

      • Non-interactive mode: when no collection argument is given and the input is not interactive, list the mapped collections that are not created yet, and exit without creating anything.
      • --all: create every mapped collection that does not exist yet.
      • --recreate: drop and recreate the collections that already exist, to rebuild them from a changed map.

      Notes

      • The collection argument stays optional for backward compatibility. Passing a collection name keeps the current behavior.
      • --no-server still only validates the configuration.
      • --recreate is destructive: dropping a collection removes its documents. The data keys stay in the key vault and are reused by alternate key name, so a recreated collection works with the same keys. The option should ask for confirmation in production, like the rewrap command does with ConfirmableTrait.
      • The option names are open for discussion.

              Assignee:
              Jérôme Tamarelle
              Reporter:
              Jérôme Tamarelle
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: