mirror of
https://github.com/plashchynski/crono.git
synced 2026-03-17 23:14:14 +01:00
Replace the file DB with shared cached memory DB
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
TMP_DB_FILE = "tmp/test_db.sqlite3"
|
||||
|
||||
require 'bundler/setup'
|
||||
Bundler.setup
|
||||
|
||||
@@ -8,9 +6,7 @@ require 'byebug'
|
||||
require 'crono'
|
||||
require 'generators/crono/install/templates/migrations/create_crono_jobs.rb'
|
||||
|
||||
FileUtils.rm(TMP_DB_FILE) if File.exist?(TMP_DB_FILE)
|
||||
|
||||
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: TMP_DB_FILE)
|
||||
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: "file::memory:?cache=shared")
|
||||
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
||||
CreateCronoJobs.up
|
||||
|
||||
|
||||
Reference in New Issue
Block a user