Sha256: c73ec691115459b5792e156940e11ddf833c4d4669cf4e841b0ea9f14934f385

Contents?: true

Size: 431 Bytes

Versions: 1

Compression:

Stored size: 431 Bytes

Contents

#!/usr/bin/env bash

set -e

echo
echo "Clearing Messages Table"
echo "= = ="
echo

default_name=message_store

if [ -z ${DATABASE_NAME+x} ]; then
  echo "(DATABASE_NAME is not set)"
  database=$default_name
else
  database=$DATABASE_NAME
fi
echo "Database name is: $database"

echo

psql $database -v ON_ERROR_STOP=1 -q -c "TRUNCATE message_store.messages RESTART IDENTITY;"

echo "= = ="
echo "Done Clearing Messages Table"
echo

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
message-db-3.0.0 database/clear-messages.sh