dataflow.utils.vault_migration_script¶
Fixed Vault Reference Migration Script.
This script migrates API keys and secrets to the vault schema, using proper schema mapping with the existing table() helper function.
Functions¶
Add helper functions to resolve vault references. |
|
|
Create a new secret in the vault. |
|
Ensure the table has a vault_reference column for secret references. |
|
Execute SQL safely through Supabase RPC function. |
Get existing vault secrets to avoid duplicates. |
|
|
Main function to run the migration. |
Migrate component_env_mappings to include vault references. |
|
Migrate engine API keys to vault references. |
|
Migrate config.environment_variables to use vault references. |
|
Migrate provider API keys to vault references. |
Module Contents¶
- dataflow.utils.vault_migration_script.add_vault_helper_functions()¶
Add helper functions to resolve vault references.
- Returns:
True if successful, False if SQL should be run manually
- Return type:
- dataflow.utils.vault_migration_script.create_vault_secret(name, description, value=None)¶
Create a new secret in the vault.
- dataflow.utils.vault_migration_script.ensure_vault_reference_column(table_name)¶
Ensure the table has a vault_reference column for secret references. Uses table() helper function for proper schema resolution.
- dataflow.utils.vault_migration_script.execute_sql(sql)¶
Execute SQL safely through Supabase RPC function.
- Parameters:
sql (str)
- Return type:
Any
- dataflow.utils.vault_migration_script.get_existing_vault_secrets()¶
Get existing vault secrets to avoid duplicates.
- dataflow.utils.vault_migration_script.main()¶
Main function to run the migration.
- dataflow.utils.vault_migration_script.migrate_component_env_mappings()¶
Migrate component_env_mappings to include vault references.
- Returns:
Number of mappings migrated
- Return type:
- dataflow.utils.vault_migration_script.migrate_engine_api_keys()¶
Migrate engine API keys to vault references.
- Returns:
Number of engines with API keys migrated
- Return type:
- dataflow.utils.vault_migration_script.migrate_environment_variables()¶
Migrate config.environment_variables to use vault references.
- Returns:
Number of environment variables migrated
- Return type: