Drop unused BUR title column
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
class BulkUpdateRequest < ApplicationRecord
|
class BulkUpdateRequest < ApplicationRecord
|
||||||
|
attr_accessor :title
|
||||||
attr_accessor :reason
|
attr_accessor :reason
|
||||||
attr_reader :skip_secondary_validations
|
attr_reader :skip_secondary_validations
|
||||||
|
|
||||||
@@ -33,8 +34,7 @@ class BulkUpdateRequest < ApplicationRecord
|
|||||||
def search(params = {})
|
def search(params = {})
|
||||||
q = super
|
q = super
|
||||||
|
|
||||||
q = q.search_attributes(params, :user, :approver, :forum_topic_id, :forum_post_id, :title, :script)
|
q = q.search_attributes(params, :user, :approver, :forum_topic_id, :forum_post_id, :script)
|
||||||
q = q.text_attribute_matches(:title, params[:title_matches])
|
|
||||||
q = q.text_attribute_matches(:script, params[:script_matches])
|
q = q.text_attribute_matches(:script, params[:script_matches])
|
||||||
|
|
||||||
if params[:status].present?
|
if params[:status].present?
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<%= search_form_for(bulk_update_requests_path) do |f| %>
|
<%= search_form_for(bulk_update_requests_path) do |f| %>
|
||||||
<%= f.input :user_name, label: "Creator", input_html: { value: params[:search][:user_name], data: { autocomplete: "user" } } %>
|
<%= f.input :user_name, label: "Creator", input_html: { value: params[:search][:user_name], data: { autocomplete: "user" } } %>
|
||||||
<%= f.input :approver_name, label: "Approver", input_html: { value: params[:search][:approver_name], data: { autocomplete: "user" } } %>
|
<%= f.input :approver_name, label: "Approver", input_html: { value: params[:search][:approver_name], data: { autocomplete: "user" } } %>
|
||||||
<%= f.input :title_matches, label: "Title", input_html: { value: params[:search][:title_matches] } %>
|
|
||||||
<%= f.input :script_matches, label: "Script", input_html: { value: params[:search][:script_matches] } %>
|
<%= f.input :script_matches, label: "Script", input_html: { value: params[:search][:script_matches] } %>
|
||||||
<%= f.input :status, label: "Status", collection: %w[pending approved rejected], include_blank: true, selected: params[:search][:status] %>
|
<%= f.input :status, label: "Status", collection: %w[pending approved rejected], include_blank: true, selected: params[:search][:status] %>
|
||||||
<%= f.input :order, collection: [%w[Status status_desc], %w[Last\ updated updated_at_desc], %w[Newest id_desc], %w[Oldest id_asc]], include_blank: false, selected: params[:search][:order] %>
|
<%= f.input :order, collection: [%w[Status status_desc], %w[Last\ updated updated_at_desc], %w[Newest id_desc], %w[Oldest id_asc]], include_blank: false, selected: params[:search][:order] %>
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
class DropTitleFromBulkUpdateRequests < ActiveRecord::Migration[6.0]
|
||||||
|
def change
|
||||||
|
remove_column :bulk_update_requests, :title, :text, null: false, default: ""
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -669,8 +669,7 @@ CREATE TABLE public.bulk_update_requests (
|
|||||||
created_at timestamp without time zone NOT NULL,
|
created_at timestamp without time zone NOT NULL,
|
||||||
updated_at timestamp without time zone NOT NULL,
|
updated_at timestamp without time zone NOT NULL,
|
||||||
approver_id integer,
|
approver_id integer,
|
||||||
forum_post_id integer,
|
forum_post_id integer
|
||||||
title text
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -7370,6 +7369,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
|||||||
('20200306202253'),
|
('20200306202253'),
|
||||||
('20200307021204'),
|
('20200307021204'),
|
||||||
('20200309035334'),
|
('20200309035334'),
|
||||||
('20200309043653');
|
('20200309043653'),
|
||||||
|
('20200318224633');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user