I have a table that I want to replicate that has a partial index has a unique constraint. SymmetricDS does not support this and incorrectly replicate the index without the clause, which creates more problems.
Is there any way around this ? (short of manually dropping the index or recreating it with the partial version)
basically table is:
create table group_items (
id serial,
group_id int,
item_id string,
deleted_at timestamp
);
create unique index unique_active_group_item_idx references group_items(group_id, item_id) where deleted_at is null;
and the index being recreated is:
create unique index unique_active_group_item_idx references group_items(group_id, item_id)
Last edit: Stephane B. 2015-06-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The only workaround right now is to not use that feature of SymmetricDS.
I have in the past used initial.load.schema.dump.command and initial.load.schema.load.command to dump and load a schema during initial load. To use those you have to have command line utilities that can dump and load the schema.
There is also initial.load.before.sql. You can keep a create script in sym_parameter under that parameter name and it will be run before the initial load starts.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a table that I want to replicate that has a partial index has a unique constraint. SymmetricDS does not support this and incorrectly replicate the index without the clause, which creates more problems.
Is there any way around this ? (short of manually dropping the index or recreating it with the partial version)
basically table is:
and the index being recreated is:
Last edit: Stephane B. 2015-06-19
The only workaround right now is to not use that feature of SymmetricDS.
I have in the past used initial.load.schema.dump.command and initial.load.schema.load.command to dump and load a schema during initial load. To use those you have to have command line utilities that can dump and load the schema.
There is also initial.load.before.sql. You can keep a create script in sym_parameter under that parameter name and it will be run before the initial load starts.
I opened an issue for this. In the next year we want to do some major work on our schema creation support. We'll keep this in mind.
http://www.symmetricds.org/issues/view.php?id=2325