Deleting create_db script, as it is obsolete
This commit is contained in:
parent
6f0434bf83
commit
da24698a4c
2 changed files with 0 additions and 70 deletions
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
APP_ROOT = File.expand_path(File.dirname(__FILE__)) + '/../'
|
||||
|
||||
require APP_ROOT + 'config/environment'
|
||||
require 'db_structure'
|
||||
|
||||
config = ActiveRecord::Base.configurations
|
||||
|
||||
['production', 'test', 'development'].each do |target|
|
||||
begin
|
||||
ENV['RAILS_ENV'] = target
|
||||
load APP_ROOT + 'config/environment.rb'
|
||||
puts "Creating tables for #{target}..."
|
||||
|
||||
db_structure(config[target]['adapter']).split(/\s*;\s*/).each do |sql|
|
||||
ActiveRecord::Base.connection.execute(sql)
|
||||
end
|
||||
|
||||
puts "done."
|
||||
rescue => e
|
||||
puts "failed: " + e.inspect
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue