# Error: PG::UndefinedColumn. Custom field not creating column

**URL:** https://meta.discourse.org/t/error-pg-undefinedcolumn-custom-field-not-creating-column/200115
**Category:** Support
**Created:** [August 11, 2021, 9:01pm UTC](https://meta.discourse.org/t/error-pg-undefinedcolumn-custom-field-not-creating-column/200115 "2021-08-11T21:01:54Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [August 11, 2021, 10:19pm UTC](https://meta.discourse.org/t/error-pg-undefinedcolumn-custom-field-not-creating-column/200115/3 "2021-08-11T22:19:22Z")

</div>

Thanks–I was starting to figure something like that must be going on. So perhaps I’d need to do a join with that model (really having to dust off my rails here). I’ve tried something like this:

`Topic.joins(:topic_custom_field).where(fun_level: 'super-duper-fun') }`

but I get the error: `ActiveRecord::ConfigurationError (Can't join 'Topic' to association named 'topic_custom_field'; perhaps you misspelled it?)`

Any ideas on the right syntax?

---

_[View the full topic](https://meta.discourse.org/t/error-pg-undefinedcolumn-custom-field-not-creating-column/200115)._
