update migrations
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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: "{}"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user