Sha256: 5d903283d98ee67cfa0fbc0b075fa451949f8f059965996c0f621de59a80db30

Contents?: true

Size: 501 Bytes

Versions: 15

Compression:

Stored size: 501 Bytes

Contents

#!/usr/bin/env bash

set -e

echo
echo "Clearing Events Table"
echo "= = ="
echo

default_name=message_store

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

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 -U $user -c "TRUNCATE messages RESTART IDENTITY;"

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
evt-message_store-postgres-database-0.10.1.2 database/clear-messages.sh
evt-message_store-postgres-database-0.10.1.1 database/clear-messages.sh
evt-message_store-postgres-database-0.10.1.0 database/clear-messages.sh
evt-message_store-postgres-database-0.10.0.1 database/clear-messages.sh
evt-message_store-postgres-database-0.10.0.0 database/clear-messages.sh
evt-message_store-postgres-database-0.9.0.1 database/clear-messages.sh
evt-message_store-postgres-database-0.9.0.0 database/clear-messages.sh
evt-message_store-postgres-database-0.8.0.0 database/clear-messages.sh
evt-message_store-postgres-database-0.7.1.1 database/clear-messages.sh
evt-message_store-postgres-database-0.7.1.0 database/clear-messages.sh
evt-message_store-postgres-database-0.7.0.0 database/clear-messages.sh
evt-message_store-postgres-database-0.6.0.0 database/clear-messages.sh
evt-message_store-postgres-database-0.5.0.0 database/clear-messages.sh
evt-message_store-postgres-database-0.4.1.0 database/clear-messages.sh
evt-message_store-postgres-database-0.4.0.0 database/clear-messages.sh