I've currently got a string value in one table, which I would like to change so that it references another table. For instance, currently I have:
| Table: Animal |
-----------------------
| Name | Class |
|-----------|---------|
| Horse | Mammal |
| Crocodile | Reptile |
And I want these to reference my new "AnimalClass" table, so that they look like:
| Table: Animal |
-----------------------
| Name | ClassId |
|-----------|---------|
| Horse | 3 |
| Crocodile | 14 |
I've created my new table and set the ClassId without any trouble.
Unfortunately when I try to add a foreign key constraint between my new Id and the AnimalClass table, I get this error:
SQL Error: ORA-55610: Invalid DDL statement on history-tracked table
This makes sense, because it invalidates the "Undo".
Is there any way to migrate the historic data in line with my new data, so that I can add my constraint?