You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

37 lines
1.0 KiB

Development
--------------------
Local
dropdb -U mattias ikea_foundtation_week_2025
createdb ikea_foundtation_week_2025
pg_restore -Fc --create --dbname=ikea_foundtation_week_2025 --username=mattias db20150901.bak
DB
-------------------
sudo -u postgres createuser --interactive ikea_foundation_2025
sudo -u postgres createdb -O ikea_foundation_2025 ikea_foundtation_week_2025
dropdb -U ikea_foundation ikea_foundtation_week_2025
RAILS_ENV=production rails db:migrate
rake db:create:all
CREATE EXTENSION hstore;
sudo -u postgres psql -d ikea_foundtation_week_2025
pg_dump -U ikea_foundation -Fc ikea_foundtation_week_2025 > db20140909.bak
sudo -i -u postgres
psql
Dump DEV
-------------------
pg_dump -U mattias -Fc ikea_foundtation_week_2025 > db20140909.bak
pg_dump -U mattias ikea_foundtation_week_2025 > db20140909.sql
pg_restore -Fc --dbname=ikea_foundtation_week_2025 --username=ikea_foundation dumps/db20230209.bak
pg_restore -Fc --create --dbname=ikea_foundtation_week_2025 --username=ikea_foundation db20150901.bak