Recreate-fast
When to use it
Section titled “When to use it”- target schema can be dropped every run
- you want the fastest repeatable path
- you accept rerunning from scratch after interruption
migration.toml
Section titled “migration.toml”schema = "app"on_schema_exists = "recreate"source_snapshot_mode = "none"unlogged_tables = trueclean_orphans = trueclean_orphans_mode = "apply"preserve_defaults = trueadd_unsigned_checks = falsereplicate_on_update_current_timestamp = falseworkers = 8
[source]type = "mysql"dsn = "root:root@tcp(127.0.0.1:3306)/source_db"
[target]dsn = "postgres://postgres:postgres@127.0.0.1:5432/target_db?sslmode=disable"
[type_mapping]tinyint1_as_boolean = falsebinary16_as_uuid = falsedatetime_as_timestamptz = falsejson_as_jsonb = trueenum_mode = "check"set_mode = "text"sanitize_json_null_bytes = trueunknown_as_text = false
[hooks]before_data = []after_data = []before_fk = []after_all = []Run it
Section titled “Run it”pgferry plan migration.tomlpgferry migrate migration.tomlRaw files: migration.toml