This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| buffalo [2020/02/29 20:51] – created admin | buffalo [2020/03/02 21:55] (current) – admin | ||
|---|---|---|---|
| Line 18: | Line 18: | ||
| Populate new exports '' | Populate new exports '' | ||
| + | |||
| + | ===== PostgreSQL ===== | ||
| + | |||
| + | Install: | ||
| + | |||
| + | <code bash> | ||
| + | sudo apt install postgresql | ||
| + | </ | ||
| + | |||
| + | Set password (buffalo uses postgres/ | ||
| + | |||
| + | <code bash> | ||
| + | sudo -u postgres psql # Login without password | ||
| + | postgres=# \password postgres # Sets the password for user postgres | ||
| + | sudo service postgresql restart | ||
| + | psql -U postgres -h 127.0.0.1 # Test login, should show password prompt | ||
| + | </ | ||
| ===== Create databases ===== | ===== Create databases ===== | ||
| Line 37: | Line 54: | ||
| </ | </ | ||
| - | ===== PostgreSQL ===== | + | Undo single migration |
| - | Install: | + | <code bash> |
| + | buffalo db migrate down 20200229202131 | ||
| + | </ | ||
| + | |||
| + | Apply migration | ||
| <code bash> | <code bash> | ||
| - | sudo apt install postgresql | + | buffalo db migrate up 20200229202131 |
| </ | </ | ||
| - | Set password (buffalo uses postgres/ | + | ===== Set ENV Vars ===== |
| + | |||
| + | Add to '' | ||
| <code bash> | <code bash> | ||
| - | sudo -u postgres psql # Login without password | + | ADDR=192.168.178.100 |
| - | postgres=# \password postgres # Sets the password for user postgres | + | </ |
| - | sudo service postgresql restart | + | |
| - | psql -U postgres -h 127.0.0.1 # Test login, should show password prompt | + | ===== SQL Migration ===== |
| + | |||
| + | <code bash> | ||
| + | | ||
| </ | </ | ||