embed migrations
This commit is contained in:
28
README.md
28
README.md
@@ -5,20 +5,22 @@
|
||||
|
||||
### prepare database
|
||||
|
||||
```sql
|
||||
CREATE USER hole CREATEDB;
|
||||
ALTER USER hole WITH PASSWORD "hole_pass";
|
||||
```
|
||||
sudo -u postgres psql
|
||||
```
|
||||
|
||||
```postgresql
|
||||
postgres=# CREATE USER hole WITH PASSWORD 'hole_pass';
|
||||
CREATE ROLE
|
||||
postgres=# CREATE DATABASE hole_v2 OWNER hole;
|
||||
CREATE DATABASE
|
||||
postgres=# \c hole_v2
|
||||
You are now connected to database "hole_v2" as user "postgres".
|
||||
hole_v2=# CREATE EXTENSION pg_trgm;
|
||||
CREATE EXTENSION
|
||||
hole_v2=# \q
|
||||
```
|
||||
|
||||
```
|
||||
$ diesel setup
|
||||
```
|
||||
|
||||
```sql
|
||||
\c hole_v2
|
||||
CREATE EXTENSION pg_trgm;
|
||||
```
|
||||
|
||||
```
|
||||
$ diesel run
|
||||
./hole-thu --init-database
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user