summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-11-09 08:47:30 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-11-09 08:47:30 +0000
commit02378acc80317e40f0629f92ae778932f0c69cdc (patch)
tree3106e8a28eee8609dc859c7305800d4748284e51 /db
parent47bcd7f3c31d8c779c7b3e4b3937e813c22a01c0 (diff)
downloadredmine-02378acc80317e40f0629f92ae778932f0c69cdc.tar.gz
redmine-02378acc80317e40f0629f92ae778932f0c69cdc.zip
remove trailing white-spaces from db/migrate/007_create_journals.rb (#9510)
Contributed by Igor Zubkov. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7759 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db')
-rw-r--r--db/migrate/007_create_journals.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/db/migrate/007_create_journals.rb b/db/migrate/007_create_journals.rb
index b00347839..2731d44f0 100644
--- a/db/migrate/007_create_journals.rb
+++ b/db/migrate/007_create_journals.rb
@@ -4,7 +4,7 @@ class CreateJournals < ActiveRecord::Migration
class IssueHistory < ActiveRecord::Base; belongs_to :issue; end
# model removed
class Permission < ActiveRecord::Base; end
-
+
def self.up
create_table :journals, :force => true do |t|
t.column "journalized_id", :integer, :default => 0, :null => false
@@ -20,19 +20,19 @@ class CreateJournals < ActiveRecord::Migration
t.column "old_value", :string
t.column "value", :string
end
-
+
# indexes
add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id"
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
-
+
Permission.create :controller => "issues", :action => "history", :description => "label_history", :sort => 1006, :is_public => true, :mail_option => 0, :mail_enabled => 0
# data migration
IssueHistory.find(:all, :include => :issue).each {|h|
j = Journal.new(:journalized => h.issue, :user_id => h.author_id, :notes => h.notes, :created_on => h.created_on)
j.details << JournalDetail.new(:property => 'attr', :prop_key => 'status_id', :value => h.status_id)
- j.save
- }
+ j.save
+ }
drop_table :issue_histories
end
@@ -40,7 +40,7 @@ class CreateJournals < ActiveRecord::Migration
def self.down
drop_table :journal_details
drop_table :journals
-
+
create_table "issue_histories", :force => true do |t|
t.column "issue_id", :integer, :default => 0, :null => false
t.column "status_id", :integer, :default => 0, :null => false
@@ -48,7 +48,7 @@ class CreateJournals < ActiveRecord::Migration
t.column "notes", :text, :default => ""
t.column "created_on", :timestamp
end
-
+
add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id"
Permission.find(:first, :conditions => ["controller=? and action=?", 'issues', 'history']).destroy