NoMethodError: undefined method 'add_column'
This commit is contained in:
parent
66057973ac
commit
b07ec0662d
@ -32,13 +32,13 @@ class Dmsf144 < ActiveRecord::Migration[4.2]
|
|||||||
def up
|
def up
|
||||||
change_table :dmsf_file_locks, bulk: true do |t|
|
change_table :dmsf_file_locks, bulk: true do |t|
|
||||||
# Add our entity_type column (used with our entity type)
|
# Add our entity_type column (used with our entity type)
|
||||||
t.add_column :entity_type, :integer, null: true
|
t.column :entity_type, :integer, null: true
|
||||||
# Add our lock relevent columns (ENUM) - null (till we upgrade data)
|
# Add our lock relevent columns (ENUM) - null (till we upgrade data)
|
||||||
t.add_column :lock_type_cd, :integer, null: true
|
t.column :lock_type_cd, :integer, null: true
|
||||||
t.add_column :lock_scope_cd, :integer, null: true
|
t.column :lock_scope_cd, :integer, null: true
|
||||||
t.add_column :uuid, :string, null: true, limit: 36
|
t.column :uuid, :string, null: true, limit: 36
|
||||||
# Add our expires_at column
|
# Add our expires_at column
|
||||||
t.add_column :expires_at, :datetime, null: true
|
t.column :expires_at, :datetime, null: true
|
||||||
end
|
end
|
||||||
do_not_delete = []
|
do_not_delete = []
|
||||||
# - 2012-07-12: Better compatibility for postgres - query used 3 columns however
|
# - 2012-07-12: Better compatibility for postgres - query used 3 columns however
|
||||||
|
|||||||
@ -23,8 +23,8 @@ class TrashBin < ActiveRecord::Migration[4.2]
|
|||||||
def up
|
def up
|
||||||
# DMSF - project's root folder notification
|
# DMSF - project's root folder notification
|
||||||
change_table :dmsf_folders, bulk: true do |t|
|
change_table :dmsf_folders, bulk: true do |t|
|
||||||
t.add_column :deleted, :boolean, default: false, null: false
|
t.column :deleted, :boolean, default: false, null: false
|
||||||
t.add_column :deleted_by_user_id, :integer
|
t.column :deleted_by_user_id, :integer
|
||||||
end
|
end
|
||||||
DmsfFolder.reset_column_information
|
DmsfFolder.reset_column_information
|
||||||
DmsfFolder.update_all deleted: false
|
DmsfFolder.update_all deleted: false
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class AddExternal < ActiveRecord::Migration[4.2]
|
|||||||
def up
|
def up
|
||||||
change_table :dmsf_links, bulk: true do |t|
|
change_table :dmsf_links, bulk: true do |t|
|
||||||
t.change_column :target_id, :integer, null: true
|
t.change_column :target_id, :integer, null: true
|
||||||
t.add_column :external_url, :string, null: true
|
t.column :external_url, :string, null: true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -22,9 +22,9 @@
|
|||||||
class ApprovalWorkflowStdFields < ActiveRecord::Migration[4.2]
|
class ApprovalWorkflowStdFields < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
change_table :dmsf_workflows, bulk: true do |t|
|
change_table :dmsf_workflows, bulk: true do |t|
|
||||||
t.add_column :updated_on, :timestamp
|
t.column :updated_on, :timestamp
|
||||||
t.add_column :created_on, :datetime
|
t.column :created_on, :datetime
|
||||||
t.add_column :author_id, :integer
|
t.column :author_id, :integer
|
||||||
end
|
end
|
||||||
DmsfWorkflow.reset_column_information
|
DmsfWorkflow.reset_column_information
|
||||||
# Set updated_on
|
# Set updated_on
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class DmsfFileContainer < ActiveRecord::Migration[4.2]
|
|||||||
change_table :dmsf_files, bulk: true do |t|
|
change_table :dmsf_files, bulk: true do |t|
|
||||||
t.remove_index :project_id
|
t.remove_index :project_id
|
||||||
t.rename_column :project_id, :container_id
|
t.rename_column :project_id, :container_id
|
||||||
t.add_column :container_type, :string, limit: 30, null: false, default: 'Project'
|
t.column :container_type, :string, limit: 30, null: false, default: 'Project'
|
||||||
t.add_index %i[container_id container_type]
|
t.add_index %i[container_id container_type]
|
||||||
end
|
end
|
||||||
DmsfFile.update_all container_type: 'Project'
|
DmsfFile.update_all container_type: 'Project'
|
||||||
|
|||||||
@ -83,8 +83,8 @@ class DmsfFileContainerRollback < ActiveRecord::Migration[4.2]
|
|||||||
t.remove_index(:project_id) if t.index_exists?(:project_id)
|
t.remove_index(:project_id) if t.index_exists?(:project_id)
|
||||||
t.rename_column :project_id, :container_id
|
t.rename_column :project_id, :container_id
|
||||||
# Temporarily added for the save method
|
# Temporarily added for the save method
|
||||||
t.add_column :project_id, :int, null: true
|
t.column :project_id, :int, null: true
|
||||||
t.add_column :container_type, :string, limit: 30, null: false, default: 'Project'
|
t.column :container_type, :string, limit: 30, null: false, default: 'Project'
|
||||||
end
|
end
|
||||||
DmsfFile.update_all container_type: 'Project'
|
DmsfFile.update_all container_type: 'Project'
|
||||||
file_folder_ids.each do |id, title|
|
file_folder_ids.each do |id, title|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user