# File for modifying the SQL query for create 'post'?

**URL:** <https://meta.discourse.org/t/file-for-modifying-the-sql-query-for-create-post/239173>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [September 16, 2022, 7:14am UTC](https://meta.discourse.org/t/file-for-modifying-the-sql-query-for-create-post/239173 "2022-09-16T07:14:43Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [September 16, 2022, 12:56pm UTC](https://meta.discourse.org/t/file-for-modifying-the-sql-query-for-create-post/239173/5 "2022-09-16T12:56:09Z")

</div>

Here are examples of their use:

> <https://github.com/discourse/discourse-assign/blob/7e85101b89e298b14e1cef50c37ee3de8ba63327/plugin.rb#L835>

and

> <https://github.com/VinkasHQ/discourse-autobot/blob/5777c6878d1115c3233ce79701cb4a8c35f61742/lib/autobot/post_creator.rb#L111>

Make sure you are familiar with [Rails Active Record Model](https://guides.rubyonrails.org/active_model_basics.html) concepts, because you’d normally want to do everything via Ruby on Rails rather than directly on the database.

---

_[View the full topic](https://meta.discourse.org/t/file-for-modifying-the-sql-query-for-create-post/239173)._
