You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case you clone a database, you would want to recaclulate checksums for
repeatable scripts as they already exist but checksum is wrong as database name
has changed.
#if the object name does not include '"' raise to upper case on return
@@ -894,6 +986,24 @@ def main(argv=sys.argv):
894
986
parser=argparse.ArgumentParser(prog='schemachange', description='Apply schema changes to a Snowflake account. Full readme at https://github.com/Snowflake-Labs/schemachange', formatter_class=argparse.RawTextHelpFormatter)
parser_undo.add_argument('--config-folder', type=str, default='.', help='The folder to look in for the schemachange-config.yml file (the default is the current working directory)', required=False)
991
+
parser_undo.add_argument('-s', '--step', type=int, default=1, help='Amount of versioned migrations to be undone in the reverse of their applied order', required=False)
992
+
parser_undo.add_argument('-f', '--root-folder', type=str, help='The root folder for the database change scripts', required=False)
993
+
parser_undo.add_argument('-m', '--modules-folder', type=str, help='The modules folder for jinja macros and templates to be used across multiple scripts', required=False)
994
+
parser_undo.add_argument('-a', '--snowflake-account', type=str, help='The name of the snowflake account (e.g. xy12345.east-us-2.azure)', required=False)
995
+
parser_undo.add_argument('-u', '--snowflake-user', type=str, help='The name of the snowflake user', required=False)
996
+
parser_undo.add_argument('-r', '--snowflake-role', type=str, help='The name of the default role to use', required=False)
997
+
parser_undo.add_argument('-w', '--snowflake-warehouse', type=str, help='The name of the default warehouse to use. Can be overridden in the change scripts.', required=False)
998
+
parser_undo.add_argument('-d', '--snowflake-database', type=str, help='The name of the default database to use. Can be overridden in the change scripts.', required=False)
999
+
parser_undo.add_argument('-c', '--change-history-table', type=str, help='Used to override the default name of the change history table (the default is METADATA.SCHEMACHANGE.CHANGE_HISTORY)', required=False)
1000
+
parser_undo.add_argument('--vars', type=json.loads, help='Define values for the variables to replaced in change scripts, given in JSON format (e.g. {"variable1": "value1", "variable2": "value2"})', required=False)
1001
+
parser_undo.add_argument('-ac', '--autocommit', action='store_true', help='Enable autocommit feature for DML commands (the default is False)', required=False)
1002
+
parser_undo.add_argument('-v','--verbose', action='store_true', help='Display verbose debugging details during execution (the default is False)', required=False)
1003
+
parser_undo.add_argument('--dry-run', action='store_true', help='Run schemachange in dry run mode (the default is False)', required=False)
1004
+
parser_undo.add_argument('--query-tag', type=str, help='The string to add to the Snowflake QUERY_TAG session value for each query executed', required=False)
1005
+
parser_undo.add_argument('--oauth-config', type=json.loads, help='Define values for the variables to Make Oauth Token requests (e.g. {"token-provider-url": "https//...", "token-request-payload": {"client_id": "GUID_xyz",...},... })', required=False)
1006
+
897
1007
parser_undo=subcommands.add_parser("undo")
898
1008
parser_undo.add_argument('--config-folder', type=str, default='.', help='The folder to look in for the schemachange-config.yml file (the default is the current working directory)', required=False)
899
1009
parser_undo.add_argument('-s', '--step', type=int, default=1, help='Amount of versioned migrations to be undone in the reverse of their applied order', required=False)
@@ -942,7 +1052,7 @@ def main(argv=sys.argv):
942
1052
# The original parameters did not support subcommands. Check if a subcommand has been supplied
943
1053
# if not default to deploy to match original behaviour.
0 commit comments