This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call apoc.periodic.iterate("MATCH (n) return n", "DETACH DELETE {n}", {batchSize:1000}) | |
yield batches, total return batches, total |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails 3: If you want to use the file db/seeds.rb to seed you test database before running your specs do this: | |
Create a file called spec.rake in lib/tasks/ | |
In this file you stick: | |
task :spec => ["db:test:prepare", "db:seed"] | |
and that will do the trick |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First, install macports if you haven't already. | |
sudo port install postgresql84 postgresql84-server | |
sudo mkdir -p /opt/local/var/db/postgresql84/defaultdb | |
sudo su postgres -c '/opt/local/lib/postgresql84/bin/initdb -E UTF8 -D /opt/local/var/db/postgresql84/defaultdb' | |
sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql84-server.plist |