mirror of
https://github.com/github/rails.git
synced 2026-02-04 11:15:08 -05:00
Added db:version to get the current schema number [via Tim Bray]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* Added db:version to get the current schema number [via Tim Bray]
|
||||
|
||||
* Added --skip-migration option to scaffold and resource generators #8656 [Michael Glaesemann]
|
||||
|
||||
* Fix that FCGIs would leave log files open when asked to shut down by USR2 #3028 [sebastian.kanthak/josh]
|
||||
|
||||
@@ -3,7 +3,7 @@ class <%= migration_name %> < ActiveRecord::Migration
|
||||
create_table :<%= table_name %> do |t|
|
||||
<% for attribute in attributes -%>
|
||||
t.<%= attribute.type %> :<%= attribute.name %>
|
||||
<% end -%>
|
||||
<% end %>
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
namespace :db do
|
||||
|
||||
namespace :db do
|
||||
desc 'Creates the databases defined in config/database.yml (unless they already exist)'
|
||||
task :create => :environment do
|
||||
ActiveRecord::Base.configurations.each_value do |config|
|
||||
@@ -76,7 +75,13 @@ namespace :db do
|
||||
puts 'sorry, your database adapter is not supported yet, feel free to submit a patch'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
desc "Retrieves the current schema version number"
|
||||
task :version => :environment do
|
||||
puts "Current version: " +
|
||||
ActiveRecord::Migrator.current_version.to_s
|
||||
end
|
||||
|
||||
namespace :fixtures do
|
||||
desc "Load fixtures into the current environment's database. Load specific fixtures using FIXTURES=x,y"
|
||||
task :load => :environment do
|
||||
|
||||
Reference in New Issue
Block a user