RAILS_ENV=production rake db:create will create a database for the production environment,
then
RAILS_ENV=production rake db:schema:load will create tables and columns in the database according to schema.rb for the production environment.
task :load => [:environment, :load_config] do ActiveRecord::Tasks::DatabaseTasks.load_schema_current(:ruby, ENV['SCHEMA']) end task :create => [:load_config] do ActiveRecord::Tasks::DatabaseTasks.create_current end
See this file for complete information on this topic.
source share