From b4cdf7690548d38fb6c02f20a2d640931254a445 Mon Sep 17 00:00:00 2001 From: Gabe Laughlin Date: Tue, 14 May 2019 16:49:05 -0500 Subject: [PATCH] (VDB-479) Upgrade Posgres to 11 --- .travis.yml | 4 ++-- README.md | 2 +- db/schema.sql | 18 ++---------------- scripts/install-postgres-10.sh | 17 ----------------- scripts/install-postgres-11.sh | 15 +++++++++++++++ 5 files changed, 20 insertions(+), 36 deletions(-) delete mode 100755 scripts/install-postgres-10.sh create mode 100755 scripts/install-postgres-11.sh diff --git a/.travis.yml b/.travis.yml index 57a34f0f..0eaaed8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,11 +5,11 @@ go: services: - postgresql addons: - postgresql: '9.6' + postgresql: '11.2' go_import_path: github.com/vulcanize/vulcanizedb before_install: - make installtools - - bash ./scripts/install-postgres-10.sh + - bash ./scripts/install-postgres-11.sh - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - sudo apt-get update && sudo apt-get install yarn diff --git a/README.md b/README.md index 1f926281..aa497858 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ providing a suite of tools to ease the extraction and transformation of data int ## Dependencies - Go 1.11+ - - Postgres 10.6 + - Postgres 11.2 - Ethereum Node - [Go Ethereum](https://ethereum.github.io/go-ethereum/downloads/) (1.8.23+) - [Parity 1.8.11+](https://github.com/paritytech/parity/releases) diff --git a/db/schema.sql b/db/schema.sql index a67d3ce6..1df430a0 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -2,8 +2,8 @@ -- PostgreSQL database dump -- --- Dumped from database version 10.6 --- Dumped by pg_dump version 10.6 +-- Dumped from database version 11.2 +-- Dumped by pg_dump version 11.2 SET statement_timeout = 0; SET lock_timeout = 0; @@ -15,20 +15,6 @@ SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; --- --- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - --- - -CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; - - --- --- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - --- - -COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; - - SET default_tablespace = ''; SET default_with_oids = false; diff --git a/scripts/install-postgres-10.sh b/scripts/install-postgres-10.sh deleted file mode 100755 index 9d7e124c..00000000 --- a/scripts/install-postgres-10.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# Travis doesn't support postgres 10 -# https://github.com/travis-ci/travis-ci/issues/8537 - -set -ex - -echo "Installing Postgres 10" -sudo service postgresql stop -sudo apt-get remove -q 'postgresql-*' -sudo apt-get update -q -sudo apt-get install -q postgresql-10 postgresql-client-10 -sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf - -echo "Restarting Postgres 10" -sudo service postgresql restart - -sudo psql -c 'CREATE ROLE travis SUPERUSER LOGIN CREATEDB;' -U postgres \ No newline at end of file diff --git a/scripts/install-postgres-11.sh b/scripts/install-postgres-11.sh new file mode 100755 index 00000000..b4db2a69 --- /dev/null +++ b/scripts/install-postgres-11.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -ex + +echo "Installing Postgres 11" +sudo service postgresql stop +sudo apt-get remove -q 'postgresql-*' +sudo apt-get update -q +sudo apt-get install -q postgresql-11 postgresql-client-11 +sudo cp /etc/postgresql/{9.6,11}/main/pg_hba.conf + +echo "Restarting Postgres 11" +sudo service postgresql restart + +sudo psql -c 'CREATE ROLE travis SUPERUSER LOGIN CREATEDB;' -U postgres \ No newline at end of file