Skip to content

Commit 9de79d2

Browse files
updated docs
1 parent 45ac5df commit 9de79d2

2 files changed

Lines changed: 689 additions & 40 deletions

File tree

‎README.md‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -102,27 +102,6 @@ go run main.go
102102

103103
Make sure PostgreSQL is running and reachable using the values in your `.env` file (`POSTGRES_HOST`, `POSTGRES_PORT`, `POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB`).
104104

105-
### Running database migrations
106-
107-
```bash
108-
cd server
109-
psql "postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB" \
110-
for migration in /app/migrations/*_up.sql; do
111-
filename=$(basename "$migration")
112-
already_applied=$(psql "${DB_URL}" -tAc \
113-
"SELECT COUNT(*) FROM schema_migrations WHERE filename = '${filename}'")
114-
if [ "$already_applied" = "0" ]; then
115-
echo "Applying ${filename}..."
116-
psql "${DB_URL}" -f "$migration"
117-
psql "${DB_URL}" -c \
118-
"INSERT INTO schema_migrations (filename) VALUES ('${filename}')"
119-
echo "${filename} applied."
120-
else
121-
echo "${filename} already applied, skipping."
122-
fi
123-
done
124-
```
125-
126105
### Running the mobile app
127106

128107
```bash

0 commit comments

Comments
 (0)