Just do
CREATE TABLE foo (
first_name text
);
The ENGINE
is InnoDB by default. Your default-character-set
should be set to utf8mb4
changing that to the older utf8
is a very bad. Just leave well enough alone.
BTW, I fully agree with Rick James, you really don't want text
here. The MySQL best practices would be something like varchar(255)
which stores the column in-line. There are storage implications of using text
on MySQL (though not in PostgreSQL). From the docs,
Each
BLOB
orTEXT
value is represented internally by a separately allocated object. This is in contrast to all other data types, for which storage is allocated once per column when the table is opened.
They're also a byte bigger than varchar(255)
For more information see