Last active
December 17, 2015 03:38
-
-
Save tpendragon/5544140 to your computer and use it in GitHub Desktop.
This file contains 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
# 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 |
This file contains 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
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' |
This file contains 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
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