User Tools

Site Tools


buffalo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
buffalo [2020/02/29 21:51] – created adminbuffalo [2020/02/29 22:22] admin
Line 18: Line 18:
  
 Populate new exports ''source ~/.bashrc'' Populate new exports ''source ~/.bashrc''
 +
 +===== PostgreSQL =====
 +
 +Install:
 +
 +<code bash>
 +sudo apt install postgresql
 +</code>
 +
 +Set password (buffalo uses postgres/postgres by default):
 +
 +<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
 +</code>
  
 ===== Create databases ===== ===== Create databases =====
Line 37: Line 54:
 </code> </code>
  
-===== PostgreSQL ===== +Undo single migration
- +
-Install:+
  
 <code bash> <code bash>
-sudo apt install postgresql+buffalo db migrate down 20200229202131
 </code> </code>
  
-Set password (buffalo uses postgres/postgres by default):+Apply migration
  
 <code bash> <code bash>
-sudo -u postgres psql # Login without password +buffalo db migrate up 20200229202131
-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+
 </code> </code>
  
 +===== Set ENV Vars =====
 +
 +Add to ''.env'' file in your project folder:
 +
 +<code bash>
 +ADDR=192.168.178.100
 +</code>
buffalo.txt · Last modified: 2020/03/02 22:55 by admin