From b9f338bf6018223bc821f194e835334c513e0be1 Mon Sep 17 00:00:00 2001 From: Don Browne Date: Thu, 25 Jul 2024 09:35:43 +0100 Subject: [PATCH] Remove migration_profile_backfill_log table (#3990) This was used in a migration (see migration script 17) and is no longer used. --- .../000077_drop_profile_migration.down.sql | 18 ++++++++++++++++++ .../000077_drop_profile_migration.up.sql | 15 +++++++++++++++ internal/db/models.go | 4 ---- 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 database/migrations/000077_drop_profile_migration.down.sql create mode 100644 database/migrations/000077_drop_profile_migration.up.sql diff --git a/database/migrations/000077_drop_profile_migration.down.sql b/database/migrations/000077_drop_profile_migration.down.sql new file mode 100644 index 0000000000..3406ce6c6a --- /dev/null +++ b/database/migrations/000077_drop_profile_migration.down.sql @@ -0,0 +1,18 @@ +-- Copyright 2024 Stacklok, Inc +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +CREATE TABLE migration_profile_backfill_log ( + profile_id UUID PRIMARY KEY, + FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE +); diff --git a/database/migrations/000077_drop_profile_migration.up.sql b/database/migrations/000077_drop_profile_migration.up.sql new file mode 100644 index 0000000000..1f492059b1 --- /dev/null +++ b/database/migrations/000077_drop_profile_migration.up.sql @@ -0,0 +1,15 @@ +-- Copyright 2024 Stacklok, Inc +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +DROP TABLE IF EXISTS migration_profile_backfill_log; diff --git a/internal/db/models.go b/internal/db/models.go index 252e8c85d7..1998ce7275 100644 --- a/internal/db/models.go +++ b/internal/db/models.go @@ -524,10 +524,6 @@ type LatestEvaluationStatus struct { EvaluationHistoryID uuid.UUID `json:"evaluation_history_id"` } -type MigrationProfileBackfillLog struct { - ProfileID uuid.UUID `json:"profile_id"` -} - type Profile struct { ID uuid.UUID `json:"id"` Name string `json:"name"`