LOAD DATABASE
FROM mysql://user:pass@localhost/lms
INTO postgresql://user:pass@localhost/lms
-- WITH data only, disable triggers, preserve index names
WITH create no tables, disable triggers, preserve index names
CAST
column cash.type to smallint drop typemod keep default keep not null,
column customers.pin to integer drop typemod keep default keep not null,
column netdevices.ports to integer drop typemod keep default keep not null,
column stats.upload to bigint drop typemod keep default keep not null,
column stats.download to bigint drop typemod keep default keep not null,
column up_customers.enabled to smallint drop typemod keep default keep not null,
type smallint with extra auto_increment
to serial drop typemod keep default keep not null,
type smallint when (= precision 6)
to smallint drop typemod keep default keep not null,
type int with extra auto_increment
to serial drop typemod keep default keep not null,
type int when (= precision 11)
to integer drop typemod keep default keep not null,
type tinyint when (= precision 1)
to smallint drop typemod keep default keep not null
ALTER SCHEMA 'lms' RENAME TO 'public';