vim .git/info/exclude - add files like to .gitignore
git update-index --assume-unchanged <file> <file> ... - apply changes
І таке буває...
User.joins('LEFT OUTER JOIN ( SELECT MAX(id) AS id, user_id FROM contracts GROUP BY user_id ) contracts ON contracts.user_id = user.id') .joins('LEFT OUTER JOIN contracts contract_fields ON contract_fields.id = contracts.id') .order('contract_fields.rating DESC NULLS LAST')
EXPORT DB:
pg_dump dbname | gzip > filename.gz
IMPORT DB:
gunzip -c filename.gz | psql dbname