tag implications: convert descendant_names to array (#3987).
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
class ChangeDescendantNamesToArrayOnTagImplications < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
TagImplication.without_timeout do
|
||||
change_column :tag_implications, :descendant_names, "text[]", using: "string_to_array(descendant_names, ' ')::text[]", default: "{}"
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
TagImplication.without_timeout do
|
||||
change_column :tag_implications, :descendant_names, "text", using: "array_to_string(descendant_names, ' ')", default: nil
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -3012,7 +3012,7 @@ CREATE TABLE public.tag_implications (
|
||||
id integer NOT NULL,
|
||||
antecedent_name character varying NOT NULL,
|
||||
consequent_name character varying NOT NULL,
|
||||
descendant_names text NOT NULL,
|
||||
descendant_names text[] DEFAULT '{}'::text[] NOT NULL,
|
||||
creator_id integer NOT NULL,
|
||||
creator_ip_addr inet NOT NULL,
|
||||
forum_topic_id integer,
|
||||
@@ -7572,6 +7572,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||
('20180916002448'),
|
||||
('20181108162204'),
|
||||
('20181108205842'),
|
||||
('20181113174914');
|
||||
('20181113174914'),
|
||||
('20181114180205');
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user