Skip to content

Instantly share code, notes, and snippets.

@ipmb
Created January 2, 2018 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ipmb/19835716a0887e3c5aab4ba69be3160f to your computer and use it in GitHub Desktop.
Save ipmb/19835716a0887e3c5aab4ba69be3160f to your computer and use it in GitHub Desktop.
\d logs_log
Table "public.logs_log"
Column | Type | Modifiers
--------------+--------------------------+-------------------------------------------------------
id | integer | not null default nextval('logs_log_id_seq'::regclass)
bot_id | integer |
timestamp | timestamp with time zone | not null
nick | character varying(255) | not null
text | text | not null
action | boolean | not null
command | character varying(50) |
raw | text |
room | character varying(100) |
search_index | tsvector |
channel_id | integer |
host | text |
Indexes:
"logs_log_pkey" PRIMARY KEY, btree (id)
"logs_log_bot_id" btree (bot_id)
"logs_log_channel_id" btree (channel_id)
"logs_log_channel_id_177b8d04bd00882c" btree (channel_id, "timestamp")
"search_index_tsv" gin (search_index)
Foreign-key constraints:
"bot_id_refs_id_494842aa6337bc07" FOREIGN KEY (bot_id) REFERENCES bots_chatbot(id) DEFERRABLE INITIALLY DEFERRED
"channel_id_refs_id_3c8e4a250c8a4e5b" FOREIGN KEY (channel_id) REFERENCES bots_channel(id) DEFERRABLE INITIALLY DEFERRED
Triggers:
tsvectorupdate BEFORE INSERT OR UPDATE ON logs_log FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger('search_index', 'pg_catalog.english', 'text')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment