db: fix types of various string columns.

Fix various columns to be either `character varying` or `text`,
depending on what kind of text is stored in the column. `text` is used
for columns that contain free-form natural language, like pool and forum
topic titles, while `character varying` is used for short strings that
don't contain free-form text, like URLs and status fields.

Both types are treated the same by Postgres; the only difference is how
we treat them in Rails. In edit forms, `text` fields use multi-line
textboxes, while `character varying` fields use single-line inputs. And
during search, we allow `text` fields to be searched using full-text
search, but not `character varying` fields.
This commit is contained in:
evazion
2022-09-21 21:36:43 -05:00
parent d730bd5882
commit 91fca27126
3 changed files with 48 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
<div id="form-content">
<%= edit_form_for(forum_topic) do |f| %>
<%= f.input :title %>
<%= f.input :title, as: :string %>
<div class="input">
<label for="forum_topic_category_id">Category</label>