error: access method "fulltext" does not exist
alexthamm opened this issue · 1 comments
Hi, I keep getting this error when trying to migrate my MySql DB to PostgreSQL:
--[IndexAndKeyProcessor::default] error: access method "fulltext" does not exist
SQL: CREATE INDEX "public_pg_table_pg_varchar_field1_idx"
ON "public"."pg_table"
USING FULLTEXT ("pg_varchar_field");
nmig 5.4.0 (commit c8cec71 )
PostgreSQL 12.3
MySql 5.7.31
From DBeaver:
MySql field:
- Column Name: pg_varchar_field
- Data type: varchar(100)
- Key: MUL
- Charset: latin1
- Collation: latin1_swedish_ci
Generated PostgreSQL field:
- Column Name: pg_varchar_field
- Data type: varchar
- Length: 100
- Precision: 100
- Default: NULL::character varying
- Collation: default
I changed the table and field names for this ticket as I'm not sure if I'm allowed to use the original names.
Please let me know if you need anything else.
Hi Alexander,
My apologies for the late response.
PostgreSQL's full-text search doesn't work the same way MySQL's does.
PostgreSQL doesn't have the FULLTEXT
index.
Probably the closest match to FULLTEXT
is the GIN
index.
Notice, the column must be of type TSVECTOR
to use GIN
index.
Regarding this specific error, you can safely ignore it.
I guess it didn't crash the entire migration process ))
After migration completion, consider to:
- Change a type of
"pg_varchar_field"
fromVARCHAR
toTSVECTOR
. - Create a
GIN
index on the"pg_varchar_field"
column.