Skip to content

Instantly share code, notes, and snippets.

@tpendragon
Last active December 17, 2015 03:38
Show Gist options
  • Save tpendragon/5544140 to your computer and use it in GitHub Desktop.
Save tpendragon/5544140 to your computer and use it in GitHub Desktop.
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
openroom_development:
adapter: mysql2
database: openroom_development
username: bla
password: bla
host: localhost
openroom_test:
adapter: mysql2
database: openroom_test
username: bla
password: bla
host: localhost
ArgumentError: prepare called on a closed database: rollback transaction/usr/local/rvm/gems/ruby-1.9.3-p392/gems/sqlite3-1.3.7/lib/sqlite3/database.rb:91:in `initialize'
class CreateOpenroomTables < ActiveRecord::Migration
def connection
ActiveRecord::Base.establish_connection("openroom_#{Rails.env}").connection
end
def change
create_table "BannerLookup", :primary_key => "ID", :force => true do |t|
t.string "onid", :limit => 9, :null => false
t.string "status", :limit => 30, :null => false
t.string "email", :limit => 128, :null => false
t.string "fullName", :limit => 41, :null => false
t.string "idHash", :limit => 128, :null => false
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment