How to fill 'lft' and 'rg' fields in table 'issues'
Added by arnald marcer almost 14 years ago
Hi all,
I am trying to migrate to redmine and have a legacy database with a table with a parent child structure (adjacency list). I have not found a way to populate the lft and rgt fields in the table 'issues'. Can anybody help me on how to solve this so that I can move to redmine.
Thank you very much in advance,
arnald
Replies (3)
RE: How to fill 'lft' and 'rg' fields in table 'issues' - Added by Etienne Massip almost 14 years ago
You should have a look at migration file source:trunk/db/migrate/20100313132032_add_issues_nested_sets_columns.rb, the rule has not changed since, that is :parent_id = NULL, root_id = id, lft = 1, rgt = 2
.
RE: How to fill 'lft' and 'rg' fields in table 'issues' - Added by arnald marcer almost 14 years ago
Etienne, thank you for your quick response. However, what I am looking for is if there is a tool that given a table with id and parent_id correctly set will fill lft and rgt for me. Do you know of any such tool ?
Thank you.
Arnald
RE: How to fill 'lft' and 'rg' fields in table 'issues' - Added by Felix Schäfer almost 14 years ago
You should have a look at the other importers and draw inspiration from there.