-
-
Notifications
You must be signed in to change notification settings - Fork 89
Description
cannot add_source from postgres 9 to postgres 14
i have config the yml like this
type_override:
"tinyint(1)":
override_to: boolean
override_tables:
- "*"
postgres destination connection
pg_conn:
host: "host"
port: "5432"
user: "repl_user"
password: "pasword"
database: "db_replica"
charset: "utf8"
sources:
pgsql:
db_conn:
host: "host"
port: "5432"
user: "repl_user"
password: "pasword"
database: "pgtopg"
charset: 'utf8'
connect_timeout: 10
schema_mappings:
myschema: myschema
limit_tables:
skip_tables:
copy_max_memory: "300M"
grant_select_to:
- repl_user
lock_timeout: "10s"
my_server_id: 100
replica_batch_size: 3000
replay_max_rows: 10000
sleep_loop: 5
batch_retention: '1 day'
copy_mode: 'file'
out_dir: /tmp
type: pgsql
i found the error when chameleon add_source --config migrate-pg-to-pg --source pgsql
Traceback (most recent call last):
File "/chameleon/envmigration/bin/chameleon", line 5, in
exec(compile(open(file).read(), file, 'exec'))
File "/chameleon/envmigration/bin/chameleon.py", line 61, in
getattr(replica, args.command)()
File "/chameleon/envmigration/lib64/python3.8/site-packages/pg_chameleon/lib/global_lib.py", line 301, in add_source
self.pg_engine.add_source()
File "/chameleon/envmigration/lib64/python3.8/site-packages/pg_chameleon/lib/pg_lib.py", line 2264, in add_source
check_mappings = self.check_schema_mappings()
File "/chameleon/envmigration/lib64/python3.8/site-packages/pg_chameleon/lib/pg_lib.py", line 2198, in check_schema_mappings
schema_mappings = json.dumps(self.sources[self.source]["schema_mappings"])
KeyError: 'schema_mappings'