Hooks
migration.toml
Section titled “migration.toml”schema = "app"on_schema_exists = "error"source_snapshot_mode = "none"unlogged_tables = falseclean_orphans = falsepreserve_defaults = true
[source]type = "sqlite"dsn = "./source.db"
[target]dsn = "postgres://postgres:postgres@127.0.0.1:5432/target_db?sslmode=disable"
[type_mapping]json_as_jsonb = truesanitize_json_null_bytes = trueunknown_as_text = false
[hooks]before_data = ["before_data.sql"]after_data = ["after_data.sql"]before_fk = ["before_fk.sql"]after_all = ["after_all.sql"]Hook SQL
Section titled “Hook SQL”CREATE EXTENSION IF NOT EXISTS pgcrypto;ANALYZE {{schema}};-- Put orphan cleanup statements here if needed.-- Put views/materialized views/validation queries here.Raw files: migration.toml, before_data.sql, after_data.sql, before_fk.sql, after_all.sql