#
# SPDX-License-Identifier: AGPL-3.0
-class CreateCollections < ActiveRecord::Migration
+class CreateCollections < ActiveRecord::Migration[4.2]
def change
create_table :collections do |t|
t.string :locator
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateMetadata < ActiveRecord::Migration
+class CreateMetadata < ActiveRecord::Migration[4.2]
def change
create_table :metadata do |t|
t.string :uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameMetadataClass < ActiveRecord::Migration
+class RenameMetadataClass < ActiveRecord::Migration[4.2]
def up
rename_column :metadata, :metadatum_class, :metadata_class
end
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameCollectionCreatedByClient < ActiveRecord::Migration
+class RenameCollectionCreatedByClient < ActiveRecord::Migration[4.2]
def up
rename_column :collections, :create_by_client, :created_by_client
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddUuidToCollections < ActiveRecord::Migration
+class AddUuidToCollections < ActiveRecord::Migration[4.2]
def change
add_column :collections, :uuid, :string
end
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateNodes < ActiveRecord::Migration
+class CreateNodes < ActiveRecord::Migration[4.2]
def up
create_table :nodes do |t|
t.string :uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class CreatePipelines < ActiveRecord::Migration
+class CreatePipelines < ActiveRecord::Migration[4.2]
def up
create_table :pipelines do |t|
t.string :uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class CreatePipelineInvocations < ActiveRecord::Migration
+class CreatePipelineInvocations < ActiveRecord::Migration[4.2]
def up
create_table :pipeline_invocations do |t|
t.string :uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class AddIndexToCollectionsAndMetadata < ActiveRecord::Migration
+class AddIndexToCollectionsAndMetadata < ActiveRecord::Migration[4.2]
def up
add_index :collections, :uuid, :unique => true
add_index :metadata, :uuid, :unique => true
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateSpecimens < ActiveRecord::Migration
+class CreateSpecimens < ActiveRecord::Migration[4.2]
def up
create_table :specimens do |t|
t.string :uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateProjects < ActiveRecord::Migration
+class CreateProjects < ActiveRecord::Migration[4.2]
def up
create_table :projects do |t|
t.string :uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameMetadataAttributes < ActiveRecord::Migration
+class RenameMetadataAttributes < ActiveRecord::Migration[4.2]
def up
rename_column :metadata, :target_kind, :tail_kind
rename_column :metadata, :target_uuid, :tail
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateUsers < ActiveRecord::Migration
+class CreateUsers < ActiveRecord::Migration[4.2]
def change
create_table :users do |t|
t.string :uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateLogs < ActiveRecord::Migration
+class CreateLogs < ActiveRecord::Migration[4.2]
def up
create_table :logs do |t|
t.string :uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class AddModifiedAtToLogs < ActiveRecord::Migration
+class AddModifiedAtToLogs < ActiveRecord::Migration[4.2]
def change
add_column :logs, :modified_at, :datetime
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddUuidIndexToUsers < ActiveRecord::Migration
+class AddUuidIndexToUsers < ActiveRecord::Migration[4.2]
def change
add_index :users, :uuid, :unique => true
end
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateApiClients < ActiveRecord::Migration
+class CreateApiClients < ActiveRecord::Migration[4.2]
def change
create_table :api_clients do |t|
t.string :uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateApiClientAuthorizations < ActiveRecord::Migration
+class CreateApiClientAuthorizations < ActiveRecord::Migration[4.2]
def change
create_table :api_client_authorizations do |t|
t.string :api_token, :null => false
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameCreatedByToOwner < ActiveRecord::Migration
+class RenameCreatedByToOwner < ActiveRecord::Migration[4.2]
def tables
%w{api_clients collections logs metadata nodes pipelines pipeline_invocations projects specimens users}
end
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameMetadataToLinks < ActiveRecord::Migration
+class RenameMetadataToLinks < ActiveRecord::Migration[4.2]
def up
rename_table :metadata, :links
rename_column :links, :tail, :tail_uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class AddPropertiesToSpecimen < ActiveRecord::Migration
+class AddPropertiesToSpecimen < ActiveRecord::Migration[4.2]
def change
add_column :specimens, :properties, :text
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddManifestTextToCollection < ActiveRecord::Migration
+class AddManifestTextToCollection < ActiveRecord::Migration[4.2]
def change
add_column :collections, :manifest_text, :text
end
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateJobs < ActiveRecord::Migration
+class CreateJobs < ActiveRecord::Migration[4.2]
def change
create_table :jobs do |t|
t.string :uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateJobSteps < ActiveRecord::Migration
+class CreateJobSteps < ActiveRecord::Migration[4.2]
def change
create_table :job_steps do |t|
t.string :uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class AddPriorityToJobs < ActiveRecord::Migration
+class AddPriorityToJobs < ActiveRecord::Migration[4.2]
def change
add_column :jobs, :priority, :string
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddIndexOnTimestamps < ActiveRecord::Migration
+class AddIndexOnTimestamps < ActiveRecord::Migration[4.2]
def tables
%w{api_clients collections jobs job_steps links logs nodes pipeline_invocations pipelines projects specimens users}
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddPropertiesToPipelineInvocations < ActiveRecord::Migration
+class AddPropertiesToPipelineInvocations < ActiveRecord::Migration[4.2]
def change
add_column :pipeline_invocations, :properties, :text
end
#
# SPDX-License-Identifier: AGPL-3.0
-class RemoveNativeTargetFromLinks < ActiveRecord::Migration
+class RemoveNativeTargetFromLinks < ActiveRecord::Migration[4.2]
def up
remove_column :links, :native_target_id
remove_column :links, :native_target_type
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameProjectsToGroups < ActiveRecord::Migration
+class RenameProjectsToGroups < ActiveRecord::Migration[4.2]
def up
rename_table :projects, :groups
rename_index :groups, :index_projects_on_created_at, :index_groups_on_created_at
#
# SPDX-License-Identifier: AGPL-3.0
-class AddIsLockedByToJobs < ActiveRecord::Migration
+class AddIsLockedByToJobs < ActiveRecord::Migration[4.2]
def change
add_column :jobs, :is_locked_by, :string
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddLogToJobs < ActiveRecord::Migration
+class AddLogToJobs < ActiveRecord::Migration[4.2]
def change
add_column :jobs, :log, :string
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddTasksSummaryToJobs < ActiveRecord::Migration
+class AddTasksSummaryToJobs < ActiveRecord::Migration[4.2]
def change
add_column :jobs, :tasks_summary, :text
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddResourceLimitsToJobs < ActiveRecord::Migration
+class AddResourceLimitsToJobs < ActiveRecord::Migration[4.2]
def change
add_column :jobs, :resource_limits, :text
end
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameJobCommandToScript < ActiveRecord::Migration
+class RenameJobCommandToScript < ActiveRecord::Migration[4.2]
def up
rename_column :jobs, :command, :script
rename_column :jobs, :command_parameters, :script_parameters
#
# SPDX-License-Identifier: AGPL-3.0
-class RenamePipelineInvocationToPipelineInstance < ActiveRecord::Migration
+class RenamePipelineInvocationToPipelineInstance < ActiveRecord::Migration[4.2]
def up
rename_table :pipeline_invocations, :pipeline_instances
rename_index :pipeline_instances, :index_pipeline_invocations_on_created_at, :index_pipeline_instances_on_created_at
#
# SPDX-License-Identifier: AGPL-3.0
-class RenamePipelinesToPipelineTemplates < ActiveRecord::Migration
+class RenamePipelinesToPipelineTemplates < ActiveRecord::Migration[4.2]
def up
rename_column :pipeline_instances, :pipeline_uuid, :pipeline_template_uuid
rename_table :pipelines, :pipeline_templates
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameJobStepsToJobTasks < ActiveRecord::Migration
+class RenameJobStepsToJobTasks < ActiveRecord::Migration[4.2]
def up
rename_table :job_steps, :job_tasks
rename_index :job_tasks, :index_job_steps_on_created_at, :index_job_tasks_on_created_at
#
# SPDX-License-Identifier: AGPL-3.0
-class AddDefaultOwnerToUsers < ActiveRecord::Migration
+class AddDefaultOwnerToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :default_owner, :string
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddDefaultOwnerToApiClientAuthorizations < ActiveRecord::Migration
+class AddDefaultOwnerToApiClientAuthorizations < ActiveRecord::Migration[4.2]
def change
add_column :api_client_authorizations, :default_owner, :string
end
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateCommits < ActiveRecord::Migration
+class CreateCommits < ActiveRecord::Migration[4.2]
def change
create_table :commits do |t|
t.string :repository_name
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateCommitAncestors < ActiveRecord::Migration
+class CreateCommitAncestors < ActiveRecord::Migration[4.2]
def change
create_table :commit_ancestors do |t|
t.string :repository_name
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameOrvosToArvados < ActiveRecord::Migration
+class RenameOrvosToArvados < ActiveRecord::Migration[4.2]
def up
Link.update_all("head_kind=replace(head_kind,'orvos','arvados')")
Link.update_all("tail_kind=replace(tail_kind,'orvos','arvados')")
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateKeepDisks < ActiveRecord::Migration
+class CreateKeepDisks < ActiveRecord::Migration[4.2]
def change
create_table :keep_disks do |t|
t.string :uuid, :null => false
#
# SPDX-License-Identifier: AGPL-3.0
-class AddServiceHostAndServicePortAndServiceSslFlagToKeepDisks < ActiveRecord::Migration
+class AddServiceHostAndServicePortAndServiceSslFlagToKeepDisks < ActiveRecord::Migration[4.2]
def change
add_column :keep_disks, :service_host, :string
add_column :keep_disks, :service_port, :integer
#
# SPDX-License-Identifier: AGPL-3.0
-class AddCreatedByJobTaskToJobTasks < ActiveRecord::Migration
+class AddCreatedByJobTaskToJobTasks < ActiveRecord::Migration[4.2]
def change
add_column :job_tasks, :created_by_job_task, :string
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddQsequenceToJobTasks < ActiveRecord::Migration
+class AddQsequenceToJobTasks < ActiveRecord::Migration[4.2]
def change
add_column :job_tasks, :qsequence, :integer
end
#
# SPDX-License-Identifier: AGPL-3.0
-class FixJobTaskQsequenceType < ActiveRecord::Migration
+class FixJobTaskQsequenceType < ActiveRecord::Migration[4.2]
def up
change_column :job_tasks, :qsequence, :integer, :limit => 8
end
#
# SPDX-License-Identifier: AGPL-3.0
-class UpdateNodesIndex < ActiveRecord::Migration
+class UpdateNodesIndex < ActiveRecord::Migration[4.2]
def up
remove_index :nodes, :hostname
add_index :nodes, :hostname
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateAuthorizedKeys < ActiveRecord::Migration
+class CreateAuthorizedKeys < ActiveRecord::Migration[4.2]
def change
create_table :authorized_keys do |t|
t.string :uuid, :null => false
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateVirtualMachines < ActiveRecord::Migration
+class CreateVirtualMachines < ActiveRecord::Migration[4.2]
def change
create_table :virtual_machines do |t|
t.string :uuid, :null => false
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateRepositories < ActiveRecord::Migration
+class CreateRepositories < ActiveRecord::Migration[4.2]
def change
create_table :repositories do |t|
t.string :uuid, :null => false
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameAuthorizedKeyAuthorizedUserToAuthorizedUserUuid < ActiveRecord::Migration
+class RenameAuthorizedKeyAuthorizedUserToAuthorizedUserUuid < ActiveRecord::Migration[4.2]
def up
remove_index :authorized_keys, [:authorized_user, :expires_at]
rename_column :authorized_keys, :authorized_user, :authorized_user_uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class AddNameUniqueIndexToRepositories < ActiveRecord::Migration
+class AddNameUniqueIndexToRepositories < ActiveRecord::Migration[4.2]
def up
remove_index :repositories, :name
add_index :repositories, :name, :unique => true
#
# SPDX-License-Identifier: AGPL-3.0
-class AddIsTrustedToApiClients < ActiveRecord::Migration
+class AddIsTrustedToApiClients < ActiveRecord::Migration[4.2]
def change
add_column :api_clients, :is_trusted, :boolean, :default => false
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddIsActiveToUsers < ActiveRecord::Migration
+class AddIsActiveToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :is_active, :boolean, :default => false
end
#
# SPDX-License-Identifier: AGPL-3.0
-class ActivateAllAdmins < ActiveRecord::Migration
+class ActivateAllAdmins < ActiveRecord::Migration[4.2]
def up
User.update_all({is_active: true}, ['is_admin=?', true])
end
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateTraits < ActiveRecord::Migration
+class CreateTraits < ActiveRecord::Migration[4.2]
def change
create_table :traits do |t|
t.string :uuid, :null => false
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateHumans < ActiveRecord::Migration
+class CreateHumans < ActiveRecord::Migration[4.2]
def change
create_table :humans do |t|
t.string :uuid, :null => false
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameForeignUuidAttributes < ActiveRecord::Migration
+class RenameForeignUuidAttributes < ActiveRecord::Migration[4.2]
def change
rename_column :api_client_authorizations, :default_owner, :default_owner_uuid
[:api_clients, :authorized_keys, :collections,
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameJobForeignUuidAttributes < ActiveRecord::Migration
+class RenameJobForeignUuidAttributes < ActiveRecord::Migration[4.2]
def change
rename_column :jobs, :cancelled_by_client, :cancelled_by_client_uuid
rename_column :jobs, :cancelled_by_user, :cancelled_by_user_uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameUserDefaultOwner < ActiveRecord::Migration
+class RenameUserDefaultOwner < ActiveRecord::Migration[4.2]
def change
rename_column :users, :default_owner, :default_owner_uuid
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddScopesToApiClientAuthorizations < ActiveRecord::Migration
+class AddScopesToApiClientAuthorizations < ActiveRecord::Migration[4.2]
def change
add_column :api_client_authorizations, :scopes, :text, :null => false, :default => ['all'].to_yaml
end
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameResourceLimitsToRuntimeConstraints < ActiveRecord::Migration
+class RenameResourceLimitsToRuntimeConstraints < ActiveRecord::Migration[4.2]
def change
rename_column :jobs, :resource_limits, :runtime_constraints
end
#
# SPDX-License-Identifier: AGPL-3.0
-class NormalizeCollectionUuid < ActiveRecord::Migration
+class NormalizeCollectionUuid < ActiveRecord::Migration[4.2]
def count_orphans
%w(head tail).each do |ht|
results = ActiveRecord::Base.connection.execute(<<-EOS)
#
# SPDX-License-Identifier: AGPL-3.0
-class FixLinkKindUnderscores < ActiveRecord::Migration
+class FixLinkKindUnderscores < ActiveRecord::Migration[4.2]
def up
update_sql <<-EOS
UPDATE links
#
# SPDX-License-Identifier: AGPL-3.0
-class NormalizeCollectionUuidsInScriptParameters < ActiveRecord::Migration
+class NormalizeCollectionUuidsInScriptParameters < ActiveRecord::Migration[4.2]
include CurrentApiClient
def up
act_as_system_user do
#
# SPDX-License-Identifier: AGPL-3.0
-class AddNondeterministicColumnToJob < ActiveRecord::Migration
+class AddNondeterministicColumnToJob < ActiveRecord::Migration[4.2]
def up
add_column :jobs, :nondeterministic, :boolean
end
#
# SPDX-License-Identifier: AGPL-3.0
-class SeparateRepositoryFromScriptVersion < ActiveRecord::Migration
+class SeparateRepositoryFromScriptVersion < ActiveRecord::Migration[4.2]
include CurrentApiClient
def fixup pt
#
# SPDX-License-Identifier: AGPL-3.0
-class AddRepositoryColumnToJob < ActiveRecord::Migration
+class AddRepositoryColumnToJob < ActiveRecord::Migration[4.2]
def up
add_column :jobs, :repository, :string
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddOutputIsPersistentToJob < ActiveRecord::Migration
+class AddOutputIsPersistentToJob < ActiveRecord::Migration[4.2]
def change
add_column :jobs, :output_is_persistent, :boolean, null: false, default: false
end
#
# SPDX-License-Identifier: AGPL-3.0
-class RemoveKindColumns < ActiveRecord::Migration
+class RemoveKindColumns < ActiveRecord::Migration[4.2]
include CurrentApiClient
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class AddSystemGroup < ActiveRecord::Migration
+class AddSystemGroup < ActiveRecord::Migration[4.2]
include CurrentApiClient
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameLogInfoToProperties < ActiveRecord::Migration
+class RenameLogInfoToProperties < ActiveRecord::Migration[4.2]
def change
rename_column :logs, :info, :properties
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddGroupClassToGroups < ActiveRecord::Migration
+class AddGroupClassToGroups < ActiveRecord::Migration[4.2]
def change
add_column :groups, :group_class, :string
add_index :groups, :group_class
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameAuthKeysUserIndex < ActiveRecord::Migration
+class RenameAuthKeysUserIndex < ActiveRecord::Migration[4.2]
# Rails' default name for this index is so long, Rails can't modify
# the index later, because the autogenerated temporary name exceeds
# PostgreSQL's 64-character limit. This migration gives the index
#
# SPDX-License-Identifier: AGPL-3.0
-class TimestampsNotNull < ActiveRecord::Migration
+class TimestampsNotNull < ActiveRecord::Migration[4.2]
def up
ActiveRecord::Base.connection.tables.each do |t|
next if t == 'schema_migrations'
#
# SPDX-License-Identifier: AGPL-3.0
-class PipelineInstanceState < ActiveRecord::Migration
+class PipelineInstanceState < ActiveRecord::Migration[4.2]
include CurrentApiClient
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class AddObjectOwnerToLogs < ActiveRecord::Migration
+class AddObjectOwnerToLogs < ActiveRecord::Migration[4.2]
include CurrentApiClient
def up
# login list. This migration converts those VM-specific scopes to the new
# general format, and back.
-class NewScopeFormat < ActiveRecord::Migration
+class NewScopeFormat < ActiveRecord::Migration[4.2]
include CurrentApiClient
VM_PATH_REGEX =
#
# SPDX-License-Identifier: AGPL-3.0
-class AddUniqueNameIndexToLinks < ActiveRecord::Migration
+class AddUniqueNameIndexToLinks < ActiveRecord::Migration[4.2]
def change
# Make sure PgPower is here. Otherwise the "where" will be ignored
# and we'll end up with a far too restrictive unique
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateKeepServices < ActiveRecord::Migration
+class CreateKeepServices < ActiveRecord::Migration[4.2]
include CurrentApiClient
def change
#
# SPDX-License-Identifier: AGPL-3.0
-class AddDescriptionToPipelineTemplates < ActiveRecord::Migration
+class AddDescriptionToPipelineTemplates < ActiveRecord::Migration[4.2]
def change
add_column :pipeline_templates, :description, :text
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddSuppliedScriptVersion < ActiveRecord::Migration
+class AddSuppliedScriptVersion < ActiveRecord::Migration[4.2]
def up
add_column :jobs, :supplied_script_version, :string
end
#
# SPDX-License-Identifier: AGPL-3.0
-class RemoveNameFromCollections < ActiveRecord::Migration
+class RemoveNameFromCollections < ActiveRecord::Migration[4.2]
def up
remove_column :collections, :name
end
#
# SPDX-License-Identifier: AGPL-3.0
-class RemoveActiveAndSuccessFromPipelineInstances < ActiveRecord::Migration
+class RemoveActiveAndSuccessFromPipelineInstances < ActiveRecord::Migration[4.2]
include CurrentApiClient
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameFolderToProject < ActiveRecord::Migration
+class RenameFolderToProject < ActiveRecord::Migration[4.2]
def up
Group.update_all("group_class = 'project'", "group_class = 'folder'")
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddDockerLocatorToJobs < ActiveRecord::Migration
+class AddDockerLocatorToJobs < ActiveRecord::Migration[4.2]
def change
add_column :jobs, :docker_image_locator, :string
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AnonymousGroup < ActiveRecord::Migration
+class AnonymousGroup < ActiveRecord::Migration[4.2]
include CurrentApiClient
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class JobTaskSerialQsequence < ActiveRecord::Migration
+class JobTaskSerialQsequence < ActiveRecord::Migration[4.2]
SEQ_NAME = "job_tasks_qsequence_seq"
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class EmptyCollection < ActiveRecord::Migration
+class EmptyCollection < ActiveRecord::Migration[4.2]
include CurrentApiClient
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class CollectionUseRegularUuids < ActiveRecord::Migration
+class CollectionUseRegularUuids < ActiveRecord::Migration[4.2]
def up
add_column :collections, :name, :string
add_column :collections, :description, :string
#
# SPDX-License-Identifier: AGPL-3.0
-class AddUniqueNameConstraints < ActiveRecord::Migration
+class AddUniqueNameConstraints < ActiveRecord::Migration[4.2]
def change
# Ensure uniqueness before adding constraints.
["collections", "pipeline_templates", "groups"].each do |table|
#
# SPDX-License-Identifier: AGPL-3.0
-class AddNotNullConstraintToGroupName < ActiveRecord::Migration
+class AddNotNullConstraintToGroupName < ActiveRecord::Migration[4.2]
def change
ActiveRecord::Base.connection.execute("update groups set name=uuid where name is null or name=''")
change_column_null :groups, :name, false
#
# SPDX-License-Identifier: AGPL-3.0
-class RemoveOutputIsPersistentColumn < ActiveRecord::Migration
+class RemoveOutputIsPersistentColumn < ActiveRecord::Migration[4.2]
def up
remove_column :jobs, :output_is_persistent
end
#
# SPDX-License-Identifier: AGPL-3.0
-class JobPriorityFixup < ActiveRecord::Migration
+class JobPriorityFixup < ActiveRecord::Migration[4.2]
def up
remove_column :jobs, :priority
add_column :jobs, :priority, :integer, null: false, default: 0
#
# SPDX-License-Identifier: AGPL-3.0
-class AddStartFinishTimeToTasksAndPipelines < ActiveRecord::Migration
+class AddStartFinishTimeToTasksAndPipelines < ActiveRecord::Migration[4.2]
def up
add_column :job_tasks, :started_at, :datetime
add_column :job_tasks, :finished_at, :datetime
#
# SPDX-License-Identifier: AGPL-3.0
-class AddDescriptionToPipelineInstancesAndJobs < ActiveRecord::Migration
+class AddDescriptionToPipelineInstancesAndJobs < ActiveRecord::Migration[4.2]
def up
add_column :pipeline_instances, :description, :text, null: true
add_column :jobs, :description, :text, null: true
#
# SPDX-License-Identifier: AGPL-3.0
-class ChangeUserOwnerUuidNotNull < ActiveRecord::Migration
+class ChangeUserOwnerUuidNotNull < ActiveRecord::Migration[4.2]
include CurrentApiClient
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class AddPropertiesToNode < ActiveRecord::Migration
+class AddPropertiesToNode < ActiveRecord::Migration[4.2]
def up
add_column :nodes, :properties, :text
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddStateToJob < ActiveRecord::Migration
+class AddStateToJob < ActiveRecord::Migration[4.2]
include CurrentApiClient
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class AddJobUuidToNodes < ActiveRecord::Migration
+class AddJobUuidToNodes < ActiveRecord::Migration[4.2]
def up
change_table :nodes do |t|
t.column :job_uuid, :string
#
# SPDX-License-Identifier: AGPL-3.0
-class AddArvadosSdkVersionToJobs < ActiveRecord::Migration
+class AddArvadosSdkVersionToJobs < ActiveRecord::Migration[4.2]
def up
change_table :jobs do |t|
t.column :arvados_sdk_version, :string
#
# SPDX-License-Identifier: AGPL-3.0
-class OwnerUuidIndex < ActiveRecord::Migration
+class OwnerUuidIndex < ActiveRecord::Migration[4.2]
def tables_with_owner_uuid
%w{api_clients authorized_keys collections groups humans
job_tasks jobs keep_disks keep_services links logs
#
# SPDX-License-Identifier: AGPL-3.0
-class DescriptionsAreStrings < ActiveRecord::Migration
+class DescriptionsAreStrings < ActiveRecord::Migration[4.2]
def tables_with_description_column
%w{collections groups jobs pipeline_instances pipeline_templates}
end
#
# SPDX-License-Identifier: AGPL-3.0
-class CollectionFileNames < ActiveRecord::Migration
+class CollectionFileNames < ActiveRecord::Migration[4.2]
include CurrentApiClient
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class SearchIndex < ActiveRecord::Migration
+class SearchIndex < ActiveRecord::Migration[4.2]
def tables_with_searchable_columns
{
"api_client_authorizations" => ["api_token", "created_by_ip_address", "last_used_by_ip_address", "default_owner_uuid"],
require "./db/migrate/20141208185217_search_index.rb"
-class NoDescriptionInSearchIndex < ActiveRecord::Migration
+class NoDescriptionInSearchIndex < ActiveRecord::Migration[4.2]
def up
all_tables = %w{collections groups jobs pipeline_instances pipeline_templates}
all_tables.each do |table|
#
# SPDX-License-Identifier: AGPL-3.0
-class FullTextSearch < ActiveRecord::Migration
+class FullTextSearch < ActiveRecord::Migration[4.2]
def up
execute "CREATE INDEX collections_full_text_search_idx ON collections USING gin(#{Collection.full_text_tsvector});"
#
# SPDX-License-Identifier: AGPL-3.0
-class SetGroupClassOnAnonymousGroup < ActiveRecord::Migration
+class SetGroupClassOnAnonymousGroup < ActiveRecord::Migration[4.2]
include CurrentApiClient
def up
act_as_system_user do
#
# SPDX-License-Identifier: AGPL-3.0
-class AllUsersCanReadAnonymousGroup < ActiveRecord::Migration
+class AllUsersCanReadAnonymousGroup < ActiveRecord::Migration[4.2]
include CurrentApiClient
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameReplicationAttributes < ActiveRecord::Migration
+class RenameReplicationAttributes < ActiveRecord::Migration[4.2]
RENAME = [[:redundancy, :replication_desired],
[:redundancy_confirmed_as, :replication_confirmed],
[:redundancy_confirmed_at, :replication_confirmed_at]]
#
# SPDX-License-Identifier: AGPL-3.0
-class CollectionNameOwnerUniqueOnlyNonExpired < ActiveRecord::Migration
+class CollectionNameOwnerUniqueOnlyNonExpired < ActiveRecord::Migration[4.2]
def find_index
indexes = ActiveRecord::Base.connection.indexes('collections')
name_owner_index = indexes.select do |index|
require 'has_uuid'
require 'kind_and_etag'
-class FixCollectionPortableDataHashWithHintedManifest < ActiveRecord::Migration
+class FixCollectionPortableDataHashWithHintedManifest < ActiveRecord::Migration[4.2]
include CurrentApiClient
class ArvadosModel < ActiveRecord::Base
#
# SPDX-License-Identifier: AGPL-3.0
-class ChangeCollectionExpiresAtToDatetime < ActiveRecord::Migration
+class ChangeCollectionExpiresAtToDatetime < ActiveRecord::Migration[4.2]
def up
change_column :collections, :expires_at, :datetime
end
require 'has_uuid'
require 'kind_and_etag'
-class AddUsernameToUsers < ActiveRecord::Migration
+class AddUsernameToUsers < ActiveRecord::Migration[4.2]
include CurrentApiClient
SEARCH_INDEX_COLUMNS =
require 'has_uuid'
require 'kind_and_etag'
-class BackwardCompatibilityForUserRepositories < ActiveRecord::Migration
+class BackwardCompatibilityForUserRepositories < ActiveRecord::Migration[4.2]
include CurrentApiClient
class ArvadosModel < ActiveRecord::Base
#
# SPDX-License-Identifier: AGPL-3.0
-class NoFilenamesInCollectionSearchIndex < ActiveRecord::Migration
+class NoFilenamesInCollectionSearchIndex < ActiveRecord::Migration[4.2]
def up
remove_index :collections, :name => 'collections_search_index'
add_index :collections, ["owner_uuid", "modified_by_client_uuid", "modified_by_user_uuid", "portable_data_hash", "uuid", "name"], name: 'collections_search_index'
#
# SPDX-License-Identifier: AGPL-3.0
-class ReadOnlyOnKeepServices < ActiveRecord::Migration
+class ReadOnlyOnKeepServices < ActiveRecord::Migration[4.2]
def change
add_column :keep_services, :read_only, :boolean, null: false, default: false
end
require "./db/migrate/20150123142953_full_text_search.rb"
-class LeadingSpaceOnFullTextIndex < ActiveRecord::Migration
+class LeadingSpaceOnFullTextIndex < ActiveRecord::Migration[4.2]
def up
# Inspect one of the full-text indexes (chosen arbitrarily) to
# determine whether this migration is needed.
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateContainersAndRequests < ActiveRecord::Migration
+class CreateContainersAndRequests < ActiveRecord::Migration[4.2]
def change
create_table :containers do |t|
t.string :uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class FixContainersIndex < ActiveRecord::Migration
+class FixContainersIndex < ActiveRecord::Migration[4.2]
def up
execute "CREATE INDEX container_requests_full_text_search_idx ON container_requests USING gin(#{ContainerRequest.full_text_tsvector});"
add_index :container_requests, ["uuid", "owner_uuid", "modified_by_client_uuid", "modified_by_user_uuid", "name", "state", "requesting_container_uuid", "container_uuid", "container_image", "cwd", "output_path"], name: 'container_requests_search_index'
#
# SPDX-License-Identifier: AGPL-3.0
-class AddExitCodeToContainers < ActiveRecord::Migration
+class AddExitCodeToContainers < ActiveRecord::Migration[4.2]
def change
add_column :containers, :exit_code, :integer
end
require 'has_uuid'
-class AddUuidToApiClientAuthorization < ActiveRecord::Migration
+class AddUuidToApiClientAuthorization < ActiveRecord::Migration[4.2]
extend HasUuid::ClassMethods
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class AddUuidToApiTokenSearchIndex < ActiveRecord::Migration
+class AddUuidToApiTokenSearchIndex < ActiveRecord::Migration[4.2]
def up
begin
remove_index :api_client_authorizations, :name => 'api_client_authorizations_search_index'
#
# SPDX-License-Identifier: AGPL-3.0
-class AddComponentsToJob < ActiveRecord::Migration
+class AddComponentsToJob < ActiveRecord::Migration[4.2]
def up
add_column :jobs, :components, :text
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddAuthsToContainer < ActiveRecord::Migration
+class AddAuthsToContainer < ActiveRecord::Migration[4.2]
def change
add_column :containers, :auth_uuid, :string
add_column :containers, :locked_by_uuid, :string
#
# SPDX-License-Identifier: AGPL-3.0
-class AddAuthAndLockToContainerIndex < ActiveRecord::Migration
+class AddAuthAndLockToContainerIndex < ActiveRecord::Migration[4.2]
Columns_were = ["uuid", "owner_uuid", "modified_by_client_uuid", "modified_by_user_uuid", "state", "log", "cwd", "output_path", "output", "container_image"]
Columns = Columns_were + ["auth_uuid", "locked_by_uuid"]
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class CreateWorkflows < ActiveRecord::Migration
+class CreateWorkflows < ActiveRecord::Migration[4.2]
def up
create_table :workflows do |t|
t.string :uuid
#
# SPDX-License-Identifier: AGPL-3.0
-class AddScriptParametersDigestToJobs < ActiveRecord::Migration
+class AddScriptParametersDigestToJobs < ActiveRecord::Migration[4.2]
def change
add_column :jobs, :script_parameters_digest, :string
add_index :jobs, :script_parameters_digest
#
# SPDX-License-Identifier: AGPL-3.0
-class PopulateScriptParametersDigest < ActiveRecord::Migration
+class PopulateScriptParametersDigest < ActiveRecord::Migration[4.2]
def up
done = false
while !done
#
# SPDX-License-Identifier: AGPL-3.0
-class RepairScriptParametersDigest < ActiveRecord::Migration
+class RepairScriptParametersDigest < ActiveRecord::Migration[4.2]
def up
Job.find_each do |j|
have = j.script_parameters_digest
#
# SPDX-License-Identifier: AGPL-3.0
-class RenameWorkflowToDefinition < ActiveRecord::Migration
+class RenameWorkflowToDefinition < ActiveRecord::Migration[4.2]
def up
rename_column :workflows, :workflow, :definition
- end
-
+ end
+
def down
rename_column :workflows, :definition, :workflow
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddContainerCount < ActiveRecord::Migration
+class AddContainerCount < ActiveRecord::Migration[4.2]
def up
add_column :container_requests, :container_count, :int, :default => 0
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddUseExistingToContainerRequests < ActiveRecord::Migration
+class AddUseExistingToContainerRequests < ActiveRecord::Migration[4.2]
def up
add_column :container_requests, :use_existing, :boolean, :default => true
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddSchedulingParametersToContainer < ActiveRecord::Migration
+class AddSchedulingParametersToContainer < ActiveRecord::Migration[4.2]
def change
add_column :containers, :scheduling_parameters, :text
add_column :container_requests, :scheduling_parameters, :text
require 'has_uuid'
-class AddOutputAndLogUuidToContainerRequest < ActiveRecord::Migration
+class AddOutputAndLogUuidToContainerRequest < ActiveRecord::Migration[4.2]
extend HasUuid::ClassMethods
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class AddOutputAndLogUuidsToContainerRequestSearchIndex < ActiveRecord::Migration
+class AddOutputAndLogUuidsToContainerRequestSearchIndex < ActiveRecord::Migration[4.2]
def up
begin
remove_index :container_requests, :name => 'container_requests_search_index'
#
# SPDX-License-Identifier: AGPL-3.0
-class FullTextSearchIndexes < ActiveRecord::Migration
+class FullTextSearchIndexes < ActiveRecord::Migration[4.2]
def fts_indexes
{
"collections" => "collections_full_text_search_idx",
#
# SPDX-License-Identifier: AGPL-3.0
-class SplitExpiryToTrashAndDelete < ActiveRecord::Migration
+class SplitExpiryToTrashAndDelete < ActiveRecord::Migration[4.2]
def up
Collection.transaction do
add_column(:collections, :trash_at, :datetime)
#
# SPDX-License-Identifier: AGPL-3.0
-class AddOutputNameToContainerRequests < ActiveRecord::Migration
+class AddOutputNameToContainerRequests < ActiveRecord::Migration[4.2]
def up
add_column :container_requests, :output_name, :string, :default => nil
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddOutputNameToContainerRequestSearchIndex < ActiveRecord::Migration
+class AddOutputNameToContainerRequestSearchIndex < ActiveRecord::Migration[4.2]
def up
begin
remove_index :container_requests, :name => 'container_requests_search_index'
#
# SPDX-License-Identifier: AGPL-3.0
-class AddOutputNameToCrFtsIndex < ActiveRecord::Migration
+class AddOutputNameToCrFtsIndex < ActiveRecord::Migration[4.2]
def up
t = "container_requests"
i = "container_requests_full_text_search_idx"
#
# SPDX-License-Identifier: AGPL-3.0
-class SetFinishedAtOnFinishedPipelineInstances < ActiveRecord::Migration
+class SetFinishedAtOnFinishedPipelineInstances < ActiveRecord::Migration[4.2]
def change
ActiveRecord::Base.connection.execute("update pipeline_instances set finished_at=updated_at where finished_at is null and (state='Failed' or state='Complete')")
end
#
# SPDX-License-Identifier: AGPL-3.0
-class NoCrMountsAndWorkflowDefInFullTextSearchIndex < ActiveRecord::Migration
+class NoCrMountsAndWorkflowDefInFullTextSearchIndex < ActiveRecord::Migration[4.2]
def fts_indexes
{
"container_requests" => "container_requests_full_text_search_idx",
#
# SPDX-License-Identifier: AGPL-3.0
-class NoDowngradeAfterJson < ActiveRecord::Migration
+class NoDowngradeAfterJson < ActiveRecord::Migration[4.2]
def up
end
#
# SPDX-License-Identifier: AGPL-3.0
-class SerializedColumnsAcceptNull < ActiveRecord::Migration
+class SerializedColumnsAcceptNull < ActiveRecord::Migration[4.2]
def change
change_column :api_client_authorizations, :scopes, :text, null: true, default: '["all"]'
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddPortableDataHashIndexToCollections < ActiveRecord::Migration
+class AddPortableDataHashIndexToCollections < ActiveRecord::Migration[4.2]
def change
add_index :collections, :portable_data_hash
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddOutputTtlToContainerRequests < ActiveRecord::Migration
+class AddOutputTtlToContainerRequests < ActiveRecord::Migration[4.2]
def change
add_column :container_requests, :output_ttl, :integer, default: 0, null: false
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddCreatedByJobTaskIndexToJobTasks < ActiveRecord::Migration
+class AddCreatedByJobTaskIndexToJobTasks < ActiveRecord::Migration[4.2]
def change
add_index :job_tasks, :created_by_job_task_uuid
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddObjectOwnerIndexToLogs < ActiveRecord::Migration
+class AddObjectOwnerIndexToLogs < ActiveRecord::Migration[4.2]
def change
add_index :logs, :object_owner_uuid
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddRequestingContainerIndexToContainerRequests < ActiveRecord::Migration
+class AddRequestingContainerIndexToContainerRequests < ActiveRecord::Migration[4.2]
def change
add_index :container_requests, :requesting_container_uuid
end
require 'migrate_yaml_to_json'
-class JobsYamlToJson < ActiveRecord::Migration
+class JobsYamlToJson < ActiveRecord::Migration[4.2]
def up
[
'components',
require 'migrate_yaml_to_json'
-class YamlToJson < ActiveRecord::Migration
+class YamlToJson < ActiveRecord::Migration[4.2]
def up
[
['collections', 'properties'],
require './db/migrate/20161213172944_full_text_search_indexes'
-class JsonCollectionProperties < ActiveRecord::Migration
+class JsonCollectionProperties < ActiveRecord::Migration[4.2]
def up
# Drop the FT index before changing column type to avoid
# "PG::DatatypeMismatch: ERROR: COALESCE types jsonb and text
#
# SPDX-License-Identifier: AGPL-3.0
-class TrashableGroups < ActiveRecord::Migration
+class TrashableGroups < ActiveRecord::Migration[4.2]
def up
add_column :groups, :trash_at, :datetime
add_index(:groups, :trash_at)
#
# SPDX-License-Identifier: AGPL-3.0
-class MaterializedPermissionView < ActiveRecord::Migration
+class MaterializedPermissionView < ActiveRecord::Migration[4.2]
@@idxtables = [:collections, :container_requests, :groups, :jobs, :links, :pipeline_instances, :pipeline_templates, :repositories, :users, :virtual_machines, :workflows, :logs]
#
# SPDX-License-Identifier: AGPL-3.0
-class AddIndexToContainers < ActiveRecord::Migration
+class AddIndexToContainers < ActiveRecord::Migration[4.2]
def up
ActiveRecord::Base.connection.execute("CREATE INDEX index_containers_on_modified_at_uuid ON containers USING btree (modified_at desc, uuid asc)")
ActiveRecord::Base.connection.execute("CREATE INDEX index_container_requests_on_container_uuid on container_requests (container_uuid)")
#
# SPDX-License-Identifier: AGPL-3.0
-class FixTrashFlagFollow < ActiveRecord::Migration
+class FixTrashFlagFollow < ActiveRecord::Migration[4.2]
def change
ActiveRecord::Base.connection.execute("DROP MATERIALIZED VIEW materialized_permission_view")
ActiveRecord::Base.connection.execute(
#
# SPDX-License-Identifier: AGPL-3.0
-class AddGinIndexToCollectionProperties < ActiveRecord::Migration
+class AddGinIndexToCollectionProperties < ActiveRecord::Migration[4.2]
def up
ActiveRecord::Base.connection.execute("CREATE INDEX collection_index_on_properties ON collections USING gin (properties);")
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddStorageClassesToCollections < ActiveRecord::Migration
+class AddStorageClassesToCollections < ActiveRecord::Migration[4.2]
def up
add_column :collections, :storage_classes_desired, :jsonb, :default => ["default"]
add_column :collections, :storage_classes_confirmed, :jsonb, :default => []
#
# SPDX-License-Identifier: AGPL-3.0
-class AddSecretMountsToContainers < ActiveRecord::Migration
+class AddSecretMountsToContainers < ActiveRecord::Migration[4.2]
def change
add_column :container_requests, :secret_mounts, :jsonb, default: {}
add_column :containers, :secret_mounts, :jsonb, default: {}
#
# SPDX-License-Identifier: AGPL-3.0
-class ChangeContainerPriorityBigint < ActiveRecord::Migration
+class ChangeContainerPriorityBigint < ActiveRecord::Migration[4.2]
def change
change_column :containers, :priority, :integer, limit: 8
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddRedirectToUserUuidToUsers < ActiveRecord::Migration
+class AddRedirectToUserUuidToUsers < ActiveRecord::Migration[4.2]
def up
add_column :users, :redirect_to_user_uuid, :string
User.reset_column_information
#
# SPDX-License-Identifier: AGPL-3.0
-class AddContainerAuthUuidIndex < ActiveRecord::Migration
+class AddContainerAuthUuidIndex < ActiveRecord::Migration[4.2]
def change
add_index :containers, :auth_uuid
end
require './db/migrate/20161213172944_full_text_search_indexes'
-class PropertiesToJsonb < ActiveRecord::Migration
+class PropertiesToJsonb < ActiveRecord::Migration[4.2]
@@tables_columns = [["nodes", "properties"],
["nodes", "info"],
require './db/migrate/20161213172944_full_text_search_indexes'
-class AddPropertiesToGroups < ActiveRecord::Migration
+class AddPropertiesToGroups < ActiveRecord::Migration[4.2]
def up
add_column :groups, :properties, :jsonb, default: {}
ActiveRecord::Base.connection.execute("CREATE INDEX group_index_on_properties ON groups USING gin (properties);")
#
# SPDX-License-Identifier: AGPL-3.0
-class IndexAllFilenames < ActiveRecord::Migration
+class IndexAllFilenames < ActiveRecord::Migration[4.2]
def up
ActiveRecord::Base.connection.execute 'ALTER TABLE collections ALTER COLUMN file_names TYPE text'
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddPdhAndTrashIndexToCollections < ActiveRecord::Migration
+class AddPdhAndTrashIndexToCollections < ActiveRecord::Migration[4.2]
def change
add_index :collections, [:portable_data_hash, :trash_at]
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddLockIndexToContainers < ActiveRecord::Migration
+class AddLockIndexToContainers < ActiveRecord::Migration[4.2]
def change
# For the current code in sdk/go/dispatch:
add_index :containers, [:locked_by_uuid, :priority]
#
# SPDX-License-Identifier: AGPL-3.0
-class DropPdhIndexFromCollections < ActiveRecord::Migration
+class DropPdhIndexFromCollections < ActiveRecord::Migration[4.2]
def change
remove_index :collections, column: :portable_data_hash
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddMd5IndexToContainers < ActiveRecord::Migration
+class AddMd5IndexToContainers < ActiveRecord::Migration[4.2]
def up
ActiveRecord::Base.connection.execute 'CREATE INDEX index_containers_on_reuse_columns on containers (md5(command), cwd, md5(environment), output_path, container_image, md5(mounts), secret_mounts_md5, md5(runtime_constraints))'
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddQueueIndexToContainers < ActiveRecord::Migration
+class AddQueueIndexToContainers < ActiveRecord::Migration[4.2]
def up
ActiveRecord::Base.connection.execute 'CREATE INDEX index_containers_on_queued_state on containers (state, (priority > 0))'
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddRuntimeStatusToContainers < ActiveRecord::Migration
+class AddRuntimeStatusToContainers < ActiveRecord::Migration[4.2]
def change
add_column :containers, :runtime_status, :jsonb, default: {}
add_index :containers, :runtime_status, using: :gin
#
# SPDX-License-Identifier: AGPL-3.0
-class AddVersionInfoToCollections < ActiveRecord::Migration
+class AddVersionInfoToCollections < ActiveRecord::Migration[4.2]
def change
# Do changes in bulk to save time on huge tables
change_table :collections, :bulk => true do |t|
#
# SPDX-License-Identifier: AGPL-3.0
-class SetCurrentVersionUuidOnCollections < ActiveRecord::Migration
+class SetCurrentVersionUuidOnCollections < ActiveRecord::Migration[4.2]
def up
# Set the current version uuid as itself
Collection.where(current_version_uuid: nil).update_all("current_version_uuid=uuid")
require './db/migrate/20161213172944_full_text_search_indexes'
-class ReplaceFullTextIndexes < ActiveRecord::Migration
+class ReplaceFullTextIndexes < ActiveRecord::Migration[4.2]
def up
FullTextSearchIndexes.new.up
end
#
# SPDX-License-Identifier: AGPL-3.0
-class RecomputeFileNamesIndex < ActiveRecord::Migration
+class RecomputeFileNamesIndex < ActiveRecord::Migration[4.2]
def do_batch(pdhs:)
ActiveRecord::Base.connection.exec_query('BEGIN')
Collection.select(:portable_data_hash, :manifest_text).where(portable_data_hash: pdhs).distinct(:portable_data_hash).each do |c|
#
# SPDX-License-Identifier: AGPL-3.0
-class RecreateCollectionUniqueNameIndex < ActiveRecord::Migration
+class RecreateCollectionUniqueNameIndex < ActiveRecord::Migration[4.2]
def up
Collection.transaction do
remove_index(:collections,
#
# SPDX-License-Identifier: AGPL-3.0
-class AddPreserveVersionToCollections < ActiveRecord::Migration
+class AddPreserveVersionToCollections < ActiveRecord::Migration[4.2]
def change
add_column :collections, :preserve_version, :boolean, default: false
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddCurrentVersionUuidToCollectionSearchIndex < ActiveRecord::Migration
+class AddCurrentVersionUuidToCollectionSearchIndex < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
def up
#
# SPDX-License-Identifier: AGPL-3.0
-class AddContainerRuntimeToken < ActiveRecord::Migration
+class AddContainerRuntimeToken < ActiveRecord::Migration[4.2]
def change
add_column :container_requests, :runtime_token, :text, :null => true
add_column :containers, :runtime_user_uuid, :text, :null => true
#
# SPDX-License-Identifier: AGPL-3.0
-class AddRuntimeTokenToContainer < ActiveRecord::Migration
+class AddRuntimeTokenToContainer < ActiveRecord::Migration[4.2]
def change
add_column :containers, :runtime_token, :text, :null => true
end
#
# SPDX-License-Identifier: AGPL-3.0
-class AddExpressionIndexToLinks < ActiveRecord::Migration
+class AddExpressionIndexToLinks < ActiveRecord::Migration[4.2]
def up
ActiveRecord::Base.connection.execute 'CREATE INDEX index_links_on_substring_head_uuid on links (substring(head_uuid, 7, 5))'
ActiveRecord::Base.connection.execute 'CREATE INDEX index_links_on_substring_tail_uuid on links (substring(tail_uuid, 7, 5))'
#
# SPDX-License-Identifier: AGPL-3.0
-class AddContainerLockCount < ActiveRecord::Migration
+class AddContainerLockCount < ActiveRecord::Migration[4.2]
def change
add_column :containers, :lock_count, :int, :null => false, :default => 0
end