|
|
|
@ -12,7 +12,7 @@ class RemoveDocuments < ActiveRecord::Migration |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def down |
|
|
|
|
unless ActiveRecord::Base.connection.table_exists 'Documents' |
|
|
|
|
unless ActiveRecord::Base.connection.table_exists? 'Documents' |
|
|
|
|
create_table "documents", :force => true do |t| |
|
|
|
|
t.integer "project_id", :default => 0, :null => false |
|
|
|
|
t.integer "category_id", :default => 0, :null => false |
|
|
|
@ -23,8 +23,6 @@ class RemoveDocuments < ActiveRecord::Migration |
|
|
|
|
add_index "documents", ["category_id"], :name => "index_documents_on_category_id" |
|
|
|
|
add_index "documents", ["created_on"], :name => "index_documents_on_created_on" |
|
|
|
|
add_index "documents", ["project_id"], :name => "documents_project_id" |
|
|
|
|
DocumentCategory.create!(:name => l(:default_doc_category_user), :position => 1) |
|
|
|
|
DocumentCategory.create!(:name => l(:default_doc_category_tech), :position => 2) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|