Development
--------------------

Local
dropdb -U mattias ikea_foundtation_week_2026
createdb ikea_foundtation_week_2026
pg_restore -Fc --create --dbname=ikea_foundtation_week_2026 --username=mattias db20150901.bak


DB
-------------------
sudo -u postgres createuser --interactive ikea_foundation_2026
sudo -u postgres createdb -O ikea_foundation_2026 ikea_foundtation_week_2026


dropdb -U ikea_foundation ikea_foundtation_week_2026

RAILS_ENV=production rails db:migrate

rake db:create:all
CREATE EXTENSION hstore;

sudo -u postgres psql -d ikea_foundtation_week_2026

pg_dump -Fc ikea_foundtation_week_2026 > db20140909.dump
pg_dump -U ikea_foundation_2026 -Fc ikea_foundtation_week_2026 > db20140909.dump


sudo -i -u postgres
psql

Dump DEV
-------------------
pg_dump -U mattias -Fc ikea_foundtation_week_2026 > db20140909.bak
pg_dump -U mattias ikea_foundtation_week_2026 > db20140909.sql

pg_restore -Fc --dbname=ikea_foundtation_week_2026 --username=ikea_foundation dumps/db20230209.bak
pg_restore -Fc --create --dbname=ikea_foundtation_week_2026 --username=ikea_foundation db20150901.bak


dropdb ikea_foundtation_week_2026
createdb ikea_foundtation_week_2026