Documentation
¶
Overview ¶
Package mysql2postgres copies the data of a MySQL or MariaDB installation into a PostgreSQL database whose schema the migrations created: the rows of the tables and columns both databases have, in foreign-key order, for the migrate mysql2postgres command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
MySQLDSN string
PostgresDSN string
Schema string
Tables string
Exclude string
Truncate bool
Yes bool
DryRun bool
BatchSize int
// Location is the IANA zone the MySQL DATETIME values are in: the
// panel's AppLocation (the session zone of its MySQL connection). A
// MySQL DSN without a loc parameter reads them in this zone, and
// timestamps that arrive as text are parsed in it, so the copied
// instants are right; the process's own zone plays no part.
Location string
}
Config is a migration run, as the command's flags set it.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig is the configuration before the flags apply: the public schema, a progress line every 1000 rows and the application's default zone.
func ParseFlags ¶
ParseFlags reads the migration's configuration from command-line arguments.
Click to show internal directories.
Click to hide internal directories.