SQLite compatibility
This commit is contained in:
parent
92fc69a5cd
commit
42ea32aefa
@ -23,7 +23,10 @@ class ApprovalWorkflowStdFields < ActiveRecord::Migration
|
||||
add_column :dmsf_workflows, :updated_on, :timestamp
|
||||
add_column :dmsf_workflows, :created_on, :datetime
|
||||
add_column :dmsf_workflows, :author_id, :integer
|
||||
DmsfWorkflow.update_all 'updated_on = now(), created_on = now(), author_id = (select id from users where admin = 1 limit 1)'
|
||||
# Set updated_on
|
||||
DmsfWorkflow.all.each(&:save)
|
||||
# Set created_on and author_id
|
||||
DmsfWorkflow.update_all 'created_on = updated_on, author_id = (select id from users where admin = 1 limit 1)'
|
||||
end
|
||||
|
||||
def self.down
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user