diff --git a/db/migrate/20181114180205_change_descendant_names_to_array_on_tag_implications.rb b/db/migrate/20181114180205_change_descendant_names_to_array_on_tag_implications.rb index 2719ac46c..f7763cdeb 100644 --- a/db/migrate/20181114180205_change_descendant_names_to_array_on_tag_implications.rb +++ b/db/migrate/20181114180205_change_descendant_names_to_array_on_tag_implications.rb @@ -1,6 +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 :tag_implications, :descendant_names, "text[]", using: "string_to_array(descendant_names, ' ')::text[]", default: "{}" end end diff --git a/db/migrate/20181114185032_change_strings_to_arrays_on_artist_versions.rb b/db/migrate/20181114185032_change_strings_to_arrays_on_artist_versions.rb index c0a696a8e..a9ba74f62 100644 --- a/db/migrate/20181114185032_change_strings_to_arrays_on_artist_versions.rb +++ b/db/migrate/20181114185032_change_strings_to_arrays_on_artist_versions.rb @@ -1,6 +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 :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: "{}" diff --git a/db/migrate/20181114202744_change_other_names_to_array_on_artists.rb b/db/migrate/20181114202744_change_other_names_to_array_on_artists.rb index a56183c4f..93e4ac5ff 100644 --- a/db/migrate/20181114202744_change_other_names_to_array_on_artists.rb +++ b/db/migrate/20181114202744_change_other_names_to_array_on_artists.rb @@ -1,6 +1,7 @@ class ChangeOtherNamesToArrayOnArtists < ActiveRecord::Migration[5.2] def up Artist.without_timeout do + change_column_default :artists, :other_names, from: '', to: false remove_index :artists, name: "index_artists_on_other_names_trgm" change_column :artists, :other_names, "text[]", using: "array_remove(regexp_split_to_array(other_names, '\\s+'), '')", default: "{}" add_index :artists, :other_names, using: :gin