Sha256: fb1848ef767f2b33b6e95af49250853a01d611234ca9f5580255029f671b1ef2

Contents?: true

Size: 412 Bytes

Versions: 15

Compression:

Stored size: 412 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 -q -c "TRUNCATE message_store.messages RESTART IDENTITY;"

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
message-db-2.1.6 database/clear-messages.sh
message-db-2.1.5 database/clear-messages.sh
message-db-2.1.4 database/clear-messages.sh
message-db-2.1.3 database/clear-messages.sh
message-db-2.1.2 database/clear-messages.sh
message-db-2.1.1 database/clear-messages.sh
message-db-2.1.0 database/clear-messages.sh
message-db-2.0.2 database/clear-messages.sh
message-db-2.0.1 database/clear-messages.sh
message-db-2.0.0 database/clear-messages.sh
message-db-1.1.3 database/clear-messages.sh
message-db-1.1.2 database/clear-messages.sh
message-db-1.1.1 database/clear-messages.sh
message-db-1.1.0 database/clear-messages.sh
message-db-1.0.0 database/clear-messages.sh