<p>The underlying database column for the plain text field type is defined by it's Max Length setting under it's field settings.</p>

<p>If you set that to something crazy high (like greater than 4294967295), it should use Long Text.</p>

<p>This means that Craft will adapt and change the column type dynamic from how much "data" you need to store/define for the field. Very powerful!</p>

<p><strong>Note or warning (from Brad Bell at P&amp;T support)</strong>
<em>I'd make sure that you really need that much storage space (up to 4GB per row!). You can really start to choke MySQL by abusing that data type. Medium Text stores a very healthy 16MB, which is still a lot of data.</em></p>

CC BY-SA 3.0
2015-01-16T07:01:57.597Z
2015-01-16T07:01:57.597Z
naboovalley
<p>I have a text field in my database in which I'm going to index the contents of a PDF file. Right now the database column for that field is defined as "TEXT" but I need more space since my PDF files can be quite large. </p>

<p>Can I change this column in the database to MEDIUMTEXT or LONGTEXT or will this be a problem with Craft somehow?</p>

<database><field>
Can I change TEXT to MEDIUMTEXT/LONGTEXT in database?
# Can I change TEXT to MEDIUMTEXT/LONGTEXT in database?

(Asked by: username_0 on 2015-01-16)

I have a text field in my database in which I'm going to index the contents of a PDF file. Right now the database column for that field is defined as "TEXT" but I need more space since my PDF files can be quite large.

Can I change this column in the database to MEDIUMTEXT or LONGTEXT or will this be a problem with Craft somehow?

**Tags:** database, field

---

## 1 answers

### Answer by username_0 on 2015-01-16. Score: 3

The underlying database column for the plain text field type is defined by it's Max Length setting under it's field settings.

If you set that to something crazy high (like greater than 4294967295), it should use Long Text.

This means that Craft will adapt and change the column type dynamic from how much "data" you need to store/define for the field. Very powerful!

**Note or warning (from Brad Bell at P&T support)**
*I'd make sure that you really need that much storage space (up to 4GB per row!). You can really start to choke MySQL by abusing that data type. Medium Text stores a very healthy 16MB, which is still a lot of data.*


---

