Convert Existing Table to M2M table

Troy Riblett
Giga Guru

We have an existing table that only serves to hold references to 2 other tables. This currently counts as a custom table against our subscription because it was created improperly (i.e. it was generated as a normal table, not by going through sys_m2m.list).

 

We would like to turn this into an M2M table, but we can't generate a listing under sys_m2m for that table name as it doesn't let you use table names that are already in use.

 

Is there any way to do this that doesn't require deleting the table and recreating it via the sys_m2m form? We have data in the table that we want to preserve as well as modules and other customizations around this.

1 ACCEPTED SOLUTION

Troy Riblett
Giga Guru

I solved this by creating a record in sys_m2m under a different table name and then changing the name to the existing table name (along with the fields) via a background script.

 

It seems to have worked.

View solution in original post

1 REPLY 1

Troy Riblett
Giga Guru

I solved this by creating a record in sys_m2m under a different table name and then changing the name to the existing table name (along with the fields) via a background script.

 

It seems to have worked.