vitess.io/vitess@v0.16.2/go/vt/vtgate/planbuilder/testdata/migration_cases.json (about)

     1  [
     2    {
     3      "comment": "revert migration",
     4      "query": "revert vitess_migration 'abc'",
     5      "plan": {
     6        "QueryType": "REVERT",
     7        "Original": "revert vitess_migration 'abc'",
     8        "Instructions": {
     9          "OperatorType": "RevertMigration",
    10          "Keyspace": {
    11            "Name": "main",
    12            "Sharded": false
    13          },
    14          "query": "revert vitess_migration 'abc'"
    15        }
    16      }
    17    },
    18    {
    19      "comment": "retry migration",
    20      "query": "alter vitess_migration 'abc' retry",
    21      "plan": {
    22        "QueryType": "UNKNOWN",
    23        "Original": "alter vitess_migration 'abc' retry",
    24        "Instructions": {
    25          "OperatorType": "Send",
    26          "Keyspace": {
    27            "Name": "main",
    28            "Sharded": false
    29          },
    30          "TargetDestination": "AllShards()",
    31          "Query": "alter vitess_migration 'abc' retry"
    32        }
    33      }
    34    },
    35    {
    36      "comment": "complete migration",
    37      "query": "alter vitess_migration 'abc' complete",
    38      "plan": {
    39        "QueryType": "UNKNOWN",
    40        "Original": "alter vitess_migration 'abc' complete",
    41        "Instructions": {
    42          "OperatorType": "Send",
    43          "Keyspace": {
    44            "Name": "main",
    45            "Sharded": false
    46          },
    47          "TargetDestination": "AllShards()",
    48          "Query": "alter vitess_migration 'abc' complete"
    49        }
    50      }
    51    },
    52    {
    53      "comment": "complete migration",
    54      "query": "alter vitess_migration 'abc' cleanup",
    55      "plan": {
    56        "QueryType": "UNKNOWN",
    57        "Original": "alter vitess_migration 'abc' cleanup",
    58        "Instructions": {
    59          "OperatorType": "Send",
    60          "Keyspace": {
    61            "Name": "main",
    62            "Sharded": false
    63          },
    64          "TargetDestination": "AllShards()",
    65          "Query": "alter vitess_migration 'abc' cleanup"
    66        }
    67      }
    68    },
    69    {
    70      "comment": "cancel migration",
    71      "query": "alter vitess_migration 'abc' cancel",
    72      "plan": {
    73        "QueryType": "UNKNOWN",
    74        "Original": "alter vitess_migration 'abc' cancel",
    75        "Instructions": {
    76          "OperatorType": "Send",
    77          "Keyspace": {
    78            "Name": "main",
    79            "Sharded": false
    80          },
    81          "TargetDestination": "AllShards()",
    82          "Query": "alter vitess_migration 'abc' cancel"
    83        }
    84      }
    85    },
    86    {
    87      "comment": "cancel all migrations",
    88      "query": "alter vitess_migration cancel all",
    89      "plan": {
    90        "QueryType": "UNKNOWN",
    91        "Original": "alter vitess_migration cancel all",
    92        "Instructions": {
    93          "OperatorType": "Send",
    94          "Keyspace": {
    95            "Name": "main",
    96            "Sharded": false
    97          },
    98          "TargetDestination": "AllShards()",
    99          "Query": "alter vitess_migration cancel all"
   100        }
   101      }
   102    }
   103  ]