{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}

module Galley.Schema.V82_RemoteDomainIndexes
  ( migration,
  )
where

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

migration :: Migration
migration :: Migration
migration = Int32 -> Text -> Client () -> Migration
Migration Int32
82 Text
"Add a secondary index for remote domains on local conversations, and remote conversations with local membership" (Client () -> Migration) -> Client () -> Migration
forall a b. (a -> b) -> a -> b
$ do
  Text -> Client ()
schema'
    Text
[r| CREATE INDEX on member_remote_user (user_remote_domain)
      |]
  Text -> Client ()
schema'
    Text
[r| CREATE INDEX on user_remote_conv (conv_remote_domain)
      |]