Merge pull request #843 from opf/fix/remove_journal_columns

Added migration to remove unused journal columns
pull/854/head
ulferts 11 years ago
commit 9a36ba57ae
  1. 87
      db/migrate/20140122161742_remove_journal_columns.rb
  2. 2
      doc/CHANGELOG.md

@ -0,0 +1,87 @@
class RemoveJournalColumns < ActiveRecord::Migration
def up
change_table :work_package_journals do |t|
t.remove :lock_version, :created_at, :root_id, :lft, :rgt
end
change_table :wiki_content_journals do |t|
t.remove :lock_version
end
change_table :time_entry_journals do |t|
t.remove :created_on
end
change_table :news_journals do |t|
t.remove :created_on
end
change_table :message_journals do |t|
t.remove :created_on
end
change_table :journals do |t|
t.remove_references :journable_data, polymorphic: true
end
change_table :attachment_journals do |t|
t.remove :created_on
end
change_table :customizable_journals do |t|
t.remove :default_value
end
drop_table :journal_details
end
def down
change_table :work_package_journals do |t|
t.integer :lock_version, :default => 0, :null => false
t.datetime :created_at
t.integer :root_id
t.integer :lft
t.integer :rgt
end
change_table :wiki_content_journals do |t|
t.integer :lock_version, :default => 0, :null => false
end
change_table :time_entry_journals do |t|
t.datetime :created_on
end
change_table :news_journals do |t|
t.datetime :created_on
end
change_table :message_journals do |t|
t.datetime :created_on
end
change_table :journals do |t|
t.references :journable_data, polymorphic: true
end
change_table :attachment_journals do |t|
t.datetime :created_on
end
change_table :customizable_journals do |t|
t.string :default_value
end
create_table :journal_details do |t|
t.integer :journal_id, :default => 0, :null => false
t.string :property, :limit => 30, :default => "", :null => false
t.string :prop_key, :limit => 30, :default => "", :null => false
t.text :old_value
t.text :value
end
end
end

@ -29,6 +29,8 @@ See doc/COPYRIGHT.rdoc for more details.
# Changelog
* `#2018` Cleanup journal tables
## 3.0.0pre43
* `#2502` New Layout for overview / my page

Loading…
Cancel
Save