forked from newrelic/rpm_contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add schema for tests Rework initialization sequence
- Loading branch information
Bill Kayser
committed
Feb 4, 2010
1 parent
5b7a4c0
commit 5fe0d26
Showing
4 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Use this file to add tables you need to do testing | ||
# These are created in a sqllite memory DB | ||
|
||
begin | ||
require 'sqlite3' | ||
require 'active_record' | ||
|
||
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:') | ||
ActiveRecord::Migration.verbose = false | ||
|
||
ActiveRecord::Schema.define do | ||
|
||
create_table :delayed_jobs, :force => true do |table| | ||
table.integer :priority, :default => 0 | ||
table.integer :attempts, :default => 0 | ||
table.text :handler | ||
table.string :last_error | ||
table.datetime :run_at | ||
table.datetime :locked_at | ||
table.string :locked_by | ||
table.datetime :failed_at | ||
table.timestamps | ||
end | ||
|
||
create_table :stories, :force => true do |table| | ||
table.string :text | ||
end | ||
end | ||
rescue LoadError | ||
# Skip AR tests | ||
end |
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