Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.d/5-internal/cleanup-cassandra-schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Remove deprecated table for storing scim external_ids.

Data has been migrated away in [release 2021-03-21](https://github.com/wireapp/wire-server/releases/tag/v2021-03-21) (see `/services/spar/migrate-data/src/Spar/DataMigration/V1_ExternalIds.hs`); last time the deprecated table has has been touched in production is before upgrade to [release 2021-03-23 (Chart Release 2.104.0)](https://github.com/wireapp/wire-server/releases/tag/v2021-03-23).
4 changes: 3 additions & 1 deletion services/spar/schema/src/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import qualified V13
import qualified V14
import qualified V15
import qualified V16
import qualified V17
import qualified V2
import qualified V3
import qualified V4
Expand Down Expand Up @@ -65,7 +66,8 @@ main = do
V13.migration,
V14.migration,
V15.migration,
V16.migration
V16.migration,
V17.migration
-- When adding migrations here, don't forget to update
-- 'schemaVersion' in Spar.Data

Expand Down
33 changes: 33 additions & 0 deletions services/spar/schema/src/V17.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-- This file is part of the Wire Server implementation.
--
-- Copyright (C) 2022 Wire Swiss GmbH <opensource@wire.com>
--
-- This program is free software: you can redistribute it and/or modify it under
-- the terms of the GNU Affero General Public License as published by the Free
-- Software Foundation, either version 3 of the License, or (at your option) any
-- later version.
--
-- This program is distributed in the hope that it will be useful, but WITHOUT
-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
-- details.
--
-- You should have received a copy of the GNU Affero General Public License along
-- with this program. If not, see <https://www.gnu.org/licenses/>.

module V17
( migration,
)
where

import Cassandra.Schema
import Imports
import Text.RawString.QQ

migration :: Migration
migration = Migration 17 "Remove table `scim_external_ids` (from db migration V10, deprecated in favor of `scim_external`, emptied in `/services/spar/migrate-data/src/Spar/DataMigration/V1_ExternalIds.hs`)" $ do
Comment thread
fisx marked this conversation as resolved.
Outdated
void $
schema'
[r|
DROP TABLE if exists scim_external_ids;
|]
1 change: 1 addition & 0 deletions services/spar/spar.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ executable spar-schema
V14
V15
V16
V17
V2
V3
V4
Expand Down
2 changes: 1 addition & 1 deletion services/spar/src/Spar/Data.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import Wire.API.User.Saml

-- | A lower bound: @schemaVersion <= whatWeFoundOnCassandra@, not @==@.
schemaVersion :: Int32
schemaVersion = 16
schemaVersion = 17

----------------------------------------------------------------------
-- helpers
Expand Down