Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
upgrade postgres and reinit
psql username
CREATE EXTENSION cube;
CREATE EXTENSION earthdistance;
drop schema public cascade;
create schema public;
CREATE TABLE alembic_version (version_num VARCHAR(32) NOT NULL);
# http://www.postgresql.org/download/linux/ubuntu/
# Create the file /etc/apt/sources.list.d/pgdg.list, and add a line for the repository
deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main
# Import the repository signing key, and update the package lists
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
# List all postgres, get rid of everything but the latest
dpkg -l | grep postgresql
# Install the latest postgresql
sudo apt-get install postgresql
# Create ROLE
sudo su - postgres
createuser --interactive
createdb username
psql
ALTER ROLE username PASSWORD 'password';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.