# Custom fields directly in DB

**URL:** <https://forum.mautic.org/t/custom-fields-directly-in-db/30334>\
**Category:** Product Support\
**Created:** [December 28, 2023, 3:44pm UTC](https://forum.mautic.org/t/custom-fields-directly-in-db/30334 "2023-12-28T15:44:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarlJohan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/carljohan/32/7016_2.png) [@CarlJohan](https://forum.mautic.org/u/CarlJohan)\
**Post date:** [December 28, 2023, 3:44pm UTC](https://forum.mautic.org/t/custom-fields-directly-in-db/30334/1 "2023-12-28T15:44:26Z")

</div>

Hi, is there anything preventing me from creating my custom fields directly in the lead\_fields table?

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [December 29, 2023, 9:56pm UTC](https://forum.mautic.org/t/custom-fields-directly-in-db/30334/2 "2023-12-29T21:56:29Z")

</div>

No,

if you create exactly correct insert statements in leads/company & lead configuration table it should work.

**but…**

I would advice against such action for as long as possible since you have an interface you can use to add fields. Going down the route of manual inserts in the database is error prone approach that would require investigation on structure and inserts on the relevant tables and in my experiance such actions rarely end up producing desired result.

I think you also have API available for adding the fields. If not its probably more reliable to implement api endpoint that uses core components of Mautic to add fields into the tables, than manually insert the records directly into the database.

Regards, M.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [December 31, 2023, 9:56am UTC](https://forum.mautic.org/t/custom-fields-directly-in-db/30334/3 "2023-12-31T09:56:32Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
