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