From 99bec416c0f15aac34e15680cb1f9eb6836c080b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 11 Nov 2019 17:53:08 +0000 Subject: [PATCH] Fix the DB migration so that the correct key is used for encrypting DS credentials. Without this upgrades from at least v5 (and earlier) won't work. --- .../98af61feea92_add_encrypted_options_to_data_sources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/versions/98af61feea92_add_encrypted_options_to_data_sources.py b/migrations/versions/98af61feea92_add_encrypted_options_to_data_sources.py index 86f1eb47e7..2ca5e9cd75 100644 --- a/migrations/versions/98af61feea92_add_encrypted_options_to_data_sources.py +++ b/migrations/versions/98af61feea92_add_encrypted_options_to_data_sources.py @@ -29,7 +29,7 @@ def upgrade(): data_sources = table( 'data_sources', sa.Column('id', sa.Integer, primary_key=True), - sa.Column('encrypted_options', ConfigurationContainer.as_mutable(EncryptedConfiguration(sa.Text, settings.SECRET_KEY, FernetEngine))), + sa.Column('encrypted_options', ConfigurationContainer.as_mutable(EncryptedConfiguration(sa.Text, settings.DATASOURCE_SECRET_KEY, FernetEngine))), sa.Column('options', ConfigurationContainer.as_mutable(Configuration))) conn = op.get_bind()