Sha256: 3f18c1506d92e2c918533c69ab84bcca3bde279c4844f269a6efb5581ac9b21b

Contents?: true

Size: 929 Bytes

Versions: 70

Compression:

Stored size: 929 Bytes

Contents

#!/usr/bin/env bash
set -e

# Just checking for a healthy container isn't enough, apparently. If
# we don't wait here, sometimes the database is inaccessible.
for i in {1..10}; do
  psql -h pg -U postgres postgres -c 'select 1' >/dev/null 2>&1 && break
  printf ' .'
  sleep 1
done
echo
out="$(psql -h pg -U postgres postgres -c 'select 1' 2>&1)"
if [[ $? != 0 ]]; then
   echo "Postgres didn't start in time:"
   echo "$out"
   exit 1
fi

# Required for migrations
export ORM_MODULE=sequel

set +e
psql -h pg -U postgres -c "drop database if exists app_development"
psql -h pg -U postgres -c "drop database if exists app_test"
set -e

psql -h pg -U postgres -c "create database app_development"
psql -h pg -U postgres -c "create database app_test"

RAILS_ENV=development ./bin/rake db:migrate
RAILS_ENV=test ./bin/rake db:migrate

echo "INSERT INTO users ( login ) VALUES ( 'admin' )  " | psql -h pg -U postgres app_development

Version data entries

70 entries across 35 versions & 1 rubygems

Version Path
appmap-0.55.0 spec/fixtures/rails6_users_app/create_app
appmap-0.55.0 spec/fixtures/rails5_users_app/create_app
appmap-0.54.4 spec/fixtures/rails5_users_app/create_app
appmap-0.54.4 spec/fixtures/rails6_users_app/create_app
appmap-0.54.3 spec/fixtures/rails6_users_app/create_app
appmap-0.54.3 spec/fixtures/rails5_users_app/create_app
appmap-0.54.2 spec/fixtures/rails6_users_app/create_app
appmap-0.54.2 spec/fixtures/rails5_users_app/create_app
appmap-0.54.1 spec/fixtures/rails6_users_app/create_app
appmap-0.54.1 spec/fixtures/rails5_users_app/create_app
appmap-0.54.0 spec/fixtures/rails6_users_app/create_app
appmap-0.54.0 spec/fixtures/rails5_users_app/create_app
appmap-0.53.0 spec/fixtures/rails5_users_app/create_app
appmap-0.53.0 spec/fixtures/rails6_users_app/create_app
appmap-0.52.1 spec/fixtures/rails6_users_app/create_app
appmap-0.52.1 spec/fixtures/rails5_users_app/create_app
appmap-0.52.0 spec/fixtures/rails6_users_app/create_app
appmap-0.52.0 spec/fixtures/rails5_users_app/create_app
appmap-0.51.3 spec/fixtures/rails6_users_app/create_app
appmap-0.51.3 spec/fixtures/rails5_users_app/create_app