File tree 4 files changed +8
-3
lines changed
4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change
1
+ * ~
2
+ * .swp
3
+ * .swo
1
4
.env
2
5
pursuemail
Original file line number Diff line number Diff line change 9
9
source ../.env
10
10
psql -d postgres -c " CREATE USER pursuemail WITH PASSWORD '$PGPASSWORD ';" || true
11
11
psql -d postgres -f sql/pre.sql
12
+ export PGHOST=localhost
12
13
export PGUSER=pursuemail
13
14
export PGDATABASE=pursuemail
14
15
@@ -21,4 +22,4 @@ for file in sql/table*.sql; do
21
22
psql -f " $file "
22
23
done
23
24
24
- /bin/bash migrate.sh
25
+ /bin/bash migrate.sh sql/migration * .sql
Original file line number Diff line number Diff line change 1
1
set -euo pipefail
2
2
3
+ export PGHOST=localhost
3
4
export PGUSER=postgres
4
5
export PGDATABASE=pursuemail
5
6
if [ " ` uname -s` " != " Linux" ]; then
@@ -8,6 +9,6 @@ if [ "`uname -s`" != "Linux" ]; then
8
9
fi
9
10
10
11
# Run migrations
11
- for file in sql/migration * .sql ; do
12
+ for file in $* ; do
12
13
psql -f " $file "
13
14
done
Original file line number Diff line number Diff line change 1
1
create extension if not exists " uuid-ossp" ;
2
2
CREATE TABLE email_account (
3
- id uuid NOT NULL UNIQUE PRIMARY KEY DEFAULT uuid_generate_v4(),
3
+ id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
4
4
email text NOT NULL ,
5
5
created timestamp WITH time zone DEFAULT now()
6
6
);
You can’t perform that action at this time.
0 commit comments