diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8cec97b5..e4c2d358 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -98,7 +98,6 @@ $ pip-compile --allow-unsafe --generate-hashes --resolver=backtracking setup.py #### Backend Update dependencies in requirements-controller.in and/or requirements-jobs.in then: ```sh -$ cd backend/ $ pip-compile --allow-unsafe --generate-hashes --resolver=backtracking backend/requirements-controller.in $ pip-compile --allow-unsafe --generate-hashes --resolver=backtracking backend/requirements-jobs.in ``` diff --git a/backend/migrations/versions/420401efbf38_update_variables_pk.py b/backend/migrations/versions/420401efbf38_update_variables_pk.py index 7b7c4fb8..6cd7f6dd 100644 --- a/backend/migrations/versions/420401efbf38_update_variables_pk.py +++ b/backend/migrations/versions/420401efbf38_update_variables_pk.py @@ -33,10 +33,7 @@ def upgrade(): op.drop_constraint('ml_model_variables_ibfk_1', 'ml_model_variables', type_='foreignkey') op.drop_constraint('PRIMARY', 'ml_model_variables', type_='primary') - with op.batch_alter_table('ml_model_variables', schema=None) as batch_op: - batch_op.add_column(sa.Column('id', sa.Integer())) - op.create_primary_key('PRIMARY', 'ml_model_variables', ['id']) - op.execute('ALTER TABLE ml_model_variables MODIFY id INTEGER NOT NULL AUTO_INCREMENT;') + op.execute('ALTER TABLE ml_model_variables ADD id INTEGER PRIMARY KEY AUTO_INCREMENT;') op.create_foreign_key( 'ml_model_variables_ibfk_1', 'ml_model_variables', 'ml_models', ['ml_model_id'], ['id']) @@ -44,9 +41,7 @@ def upgrade(): def downgrade(): op.drop_constraint('ml_model_variables_ibfk_1', 'ml_model_variables', type_='foreignkey') - op.drop_constraint('PRIMARY', 'ml_model_variables', type_='primary') - with op.batch_alter_table('ml_model_variables', schema=None) as batch_op: - batch_op.drop_column('id') + op.execute('ALTER TABLE ml_model_variables DROP COLUMN id;') op.create_primary_key( 'PRIMARY', 'ml_model_variables', ['ml_model_id', 'name']) diff --git a/frontend/src/app/ml-models/ml-model-form/ml-model-form.component.ts b/frontend/src/app/ml-models/ml-model-form/ml-model-form.component.ts index 96aae8ca..2ea0d562 100644 --- a/frontend/src/app/ml-models/ml-model-form/ml-model-form.component.ts +++ b/frontend/src/app/ml-models/ml-model-form/ml-model-form.component.ts @@ -414,7 +414,7 @@ export class MlModelFormComponent implements OnInit { controls.push(this._fb.group({ sources: [variableSources], source: [existingVariable.source], - names: [variables.filter(v => v.source === existingVariable.source).map(v => v.name)], + list: [variables.filter(v => v.source === existingVariable.source).map(v => { return {name: v.name, count: v.count} })], name: [null], })); continue;