aliases/implications: add back legacy reason field.

In Danbooru 1, aliases (and implications) had a `reason` field where
either the admin or the alias requester gave a reason for the alias.
This field was removed from the code and the database schema, but it
still existed in the production database. This adds the field back, so
that the dev schema is consistent with the production schema, and so
that legacy reasons can be viewed on site again.

* Add back legacy tag_aliases.reason and tag_implications.reason field.
* Make /tag_aliases and /tag_implications show legacy reasons.
* Add the reason field to the search form.
This commit is contained in:
evazion
2021-01-06 15:53:08 -06:00
parent c5d109dd87
commit b223a87868
8 changed files with 40 additions and 20 deletions

View File

@@ -2876,7 +2876,8 @@ CREATE TABLE public.tag_aliases (
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
approver_id integer,
forum_post_id integer
forum_post_id integer,
reason text DEFAULT ''::text NOT NULL
);
@@ -2913,7 +2914,8 @@ CREATE TABLE public.tag_implications (
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
approver_id integer,
forum_post_id integer
forum_post_id integer,
reason text DEFAULT ''::text NOT NULL
);
@@ -7523,6 +7525,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20201201211748'),
('20201213052805'),
('20201219201007'),
('20201224101208');
('20201224101208'),
('20210106212805');