· 1 min read
Screencast: Migration nach PostgreSQL
Downloads in verschiedenen Formaten:
Resourcen:
terminal
[bash] psql —version brew install postgresql initdb /usr/local/var/postgres pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start which psql rails new blog -d postgresql rake db:create:all rails g scaffold article name content:text rake db:migrate psql blog_development rails db gem install taps taps taps server sqlite://db/development.sqlite3 rbates secret taps pull postgres://rbates@localhost/store_development http://rbates:secret@localhost:5000 [/bash]
rails db
[ruby] select * from articles; d d articles ? h h select q [/ruby]
config/database.yml
[text] development: adapter: postgresql encoding: unicode database: blog_development pool: 5 username: rbates password:
test: adapter: postgresql encoding: unicode database: blog_test pool: 5 username: rbates password: [/text]
Gemfile
[ruby] gem “pg” [/ruby]