SQL schema for the application

Preparing postgres:
 $ sudo apt-get install postgresql
 $ sudo su - postgres
 $ createdb dev.shutter
 $ createuser -P shutter
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n

$ psql -U postgres -d dev.shutter
psql (9.1.10)
Type "help" for help.

dev.shutter=# grant all privileges on database "dev.shutter" to shutter;

GRANT

dev.shutter=# \q

 $ sudo vim /etc/postgresql/9.1/main/pg_hba.conf

local   all             shutter                                 md5

 $ /etc/init.d/postgresql restart

 psql -W -U shutter -d dev.shutter -f sql/schema.sql