mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-24 00:52:52 +08:00
Core models often pick up associations and columns from bundled plugins (e.g. `qa_vote_count` from `discourse-post-voting`, locale-detection indexes from `discourse-ai`), and the schema blocks at the bottom of `app/models/*.rb` should reflect those. `annotate:clean` now defaults `LOAD_PLUGINS` to the bundled plugin list (`script/list_bundled_plugins`) — the result is the same regardless of which extra plugins happen to be checked out under `plugins/`. Setting `LOAD_PLUGINS` explicitly still overrides. Includes the resulting one-off annotation regen.
28 lines
1.1 KiB
Ruby
Vendored
28 lines
1.1 KiB
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
class PostCustomField < ActiveRecord::Base
|
|
include CustomField
|
|
|
|
belongs_to :post
|
|
end
|
|
|
|
# == Schema Information
|
|
#
|
|
# Table name: post_custom_fields
|
|
#
|
|
# id :integer not null, primary key
|
|
# name :string(256) not null
|
|
# value :text
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
# post_id :integer not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_post_custom_fields_on_name_and_value (name, "left"(value, 200))
|
|
# index_post_custom_fields_on_notice (post_id) UNIQUE WHERE ((name)::text = 'notice'::text)
|
|
# index_post_custom_fields_on_post_id (post_id) UNIQUE WHERE ((name)::text = 'missing uploads'::text)
|
|
# index_post_custom_fields_on_post_id_and_name (post_id,name)
|
|
# index_post_custom_fields_on_stalled_wiki_triggered_at (post_id) UNIQUE WHERE ((name)::text = 'stalled_wiki_triggered_at'::text)
|
|
# index_post_id_where_missing_uploads_ignored (post_id) UNIQUE WHERE ((name)::text = 'missing uploads ignored'::text)
|
|
#
|