annotate db/migrate/20110220160626_add_workflows_assignee_and_author.rb @ 599:251b380117ce
feature_227
Introduce a new latest_downloads plugin to manage active and shortcut for attachments.
Add a table for attachment active/shortcut data.
Move existing active-handler code into the new plugin (but still using the "old" active column in the attachments table). Note the files_controller stuff doesn't actually work here.
author |
Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
date |
Tue, 16 Aug 2011 17:01:19 +0100 |
parents |
051f544170fe |
children |
433d4f72a19b |
rev |
line source |
Chris@245
|
1 class AddWorkflowsAssigneeAndAuthor < ActiveRecord::Migration
|
Chris@245
|
2 def self.up
|
Chris@245
|
3 add_column :workflows, :assignee, :boolean, :null => false, :default => false
|
Chris@245
|
4 add_column :workflows, :author, :boolean, :null => false, :default => false
|
Chris@245
|
5 Workflow.update_all("assignee = #{Workflow.connection.quoted_false}")
|
Chris@245
|
6 Workflow.update_all("author = #{Workflow.connection.quoted_false}")
|
Chris@245
|
7 end
|
Chris@245
|
8
|
Chris@245
|
9 def self.down
|
Chris@245
|
10 remove_column :workflows, :assignee
|
Chris@245
|
11 remove_column :workflows, :author
|
Chris@245
|
12 end
|
Chris@245
|
13 end
|