To have launchd start postgresql now and restart at login:
brew services start postgresqlOr, if you don't want/need a background service you can just run:
pg_ctl -D /usr/local/var/postgres start| defmodule Super.RepoTest do | |
| use Super.DataCase, async: true | |
| require Logger | |
| @skipped_schemas [UserService.User] | |
| defp tenant_schemas do | |
| {:ok, mods} = :application.get_key(:super, :modules) | |
| Enum.map(mods, fn mod -> |
| # Clean the database | |
| DROP TABLE IF EXISTS _orders CASCADE; | |
| DROP TABLE IF EXISTS _users CASCADE; | |
| DROP TABLE IF EXISTS orders CASCADE; | |
| DROP TABLE IF EXISTS users CASCADE; | |
| # Build the database (for hard deletion) | |
| CREATE TABLE users ( | |
| id integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY, | |
| name text NOT NULL |
Prereq:
apt-get install zsh
apt-get install git-coreGetting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh