050-create-tombstone-table.sh 524 Bytes
Newer Older
1 2 3 4
#!/bin/bash

set -eu

5
# shellcheck source=/dev/null
6 7
source "${BASE}/env_${ENVIRONMENT}"

8
echo "Create tombstone database and table if not already existing" 
Matteo Melli's avatar
Matteo Melli committed
9
echo "drop database if exists tombstone; create database tombstone" \
10
  | ssh_remote "$AZURE_MASTER" sudo -u gitlab-psql gitlab-psql -v ON_ERROR_STOP=1 -d postgres
Matteo Melli's avatar
Matteo Melli committed
11
echo "create table if not exists tombstone (created_at timestamptz default now() primary key, note text)" \
12
  | ssh_remote "$AZURE_MASTER" sudo -u gitlab-psql gitlab-psql -v ON_ERROR_STOP=1 -d tombstone