Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Feature/rails3 remove journal columns #467

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions db/migrate/20130930144642_remove_journal_columns.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
class RemoveJournalColumns < ActiveRecord::Migration
def up

change_table :work_package_journals do |t|
t.remove :lock_version, :planning_element_status_comment, :planning_element_status_id, :sti_type, :root_id, :lft, :rgt
end

change_table :journals do |t|
t.remove_references :journable_data, polymorphic: true
end

change_table :wiki_content_journals do |t|
t.remove :lock_version
end

end

def down

change_table :work_package_journals do |t|
t.integer :lock_version, :default => 0, :null => false
t.text :planning_element_status_comment
t.integer :planning_element_status_id
t.string :sti_type
t.integer :root_id
t.integer :lft
t.integer :rgt
end

change_table :journals do |t|
t.references :journable_data, polymorphic: true
end

change_table :wiki_content_journals do |t|
t.integer :lock_version, :null => false
end

end
end
1 change: 1 addition & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ See doc/COPYRIGHT.rdoc for more details.
* `#1946` Modal shown within in Modal
* `#1949` External links within modals do not work
* `#1992` Prepare schema migrations table
# `#2018` Cleanup journal tables

## 3.0.0pre19

Expand Down