Fix migrations.

This commit is contained in:
evazion 2018-12-10 19:38:56 -06:00
parent fe60672ef3
commit 28f32abe24
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
class ChangeDescendantNamesToArrayOnTagImplications < ActiveRecord::Migration[5.2]
def up
TagImplication.without_timeout do
change_column_default :tag_implications, :descendant_names, from: '', to: false
change_column_default :tag_implications, :descendant_names, from: '', to: nil
change_column :tag_implications, :descendant_names, "text[]", using: "string_to_array(descendant_names, ' ')::text[]", default: "{}"
end
end

View File

@ -1,7 +1,7 @@
class ChangeStringsToArraysOnArtistVersions < ActiveRecord::Migration[5.2]
def up
ArtistVersion.without_timeout do
change_column_default :artist_versions, :other_names, from: '', to: false
change_column_default :artist_versions, :other_names, from: '', to: nil
change_column :artist_versions, :other_names, "text[]", using: "array_remove(regexp_split_to_array(other_names, '\\s+'), '')", default: "{}"
change_column :artist_versions, :url_string, "text[]", using: "array_remove(regexp_split_to_array(url_string, '\\s+'), '')", default: "{}"