aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/migrations
diff options
context:
space:
mode:
authorOZAWA Sakuro <sakuro@2238club.org>2013-03-09 15:37:26 +0900
committerOZAWA Sakuro <sakuro@2238club.org>2013-03-09 15:38:02 +0900
commitc3a26c592ca99e92056ae46328ca69336e400882 (patch)
tree466a123035f20af6d90c730cde81fce4918a2af3 /activerecord/test/migrations
parent11dd15a5c2bd08f399793f45c04075c2fbb20861 (diff)
downloadrails-c3a26c592ca99e92056ae46328ca69336e400882.tar.gz
rails-c3a26c592ca99e92056ae46328ca69336e400882.tar.bz2
rails-c3a26c592ca99e92056ae46328ca69336e400882.zip
Preserve magic comments and content encoding of copied migrations.
During insertion of "# This migration comes from ... " comment at the beginning of a migration, presence of magic comment was not considered.
Diffstat (limited to 'activerecord/test/migrations')
-rw-r--r--activerecord/test/migrations/magic/1_currencies_have_symbols.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/migrations/magic/1_currencies_have_symbols.rb b/activerecord/test/migrations/magic/1_currencies_have_symbols.rb
new file mode 100644
index 0000000000..c066c068c2
--- /dev/null
+++ b/activerecord/test/migrations/magic/1_currencies_have_symbols.rb
@@ -0,0 +1,12 @@
+# coding: ISO-8859-15
+
+class CurrenciesHaveSymbols < ActiveRecord::Migration
+ def self.up
+ # We use ¤ for default currency symbol
+ add_column "currencies", "symbol", :string, :default => "¤"
+ end
+
+ def self.down
+ remove_column "currencies", "symbol"
+ end
+end