Automatic insertion of UUID into legacy database |
I inherited a codebase using CodeIgniter version 3 of about 50 tables to perform a task. However I have a need to add a uuid column to all the tables automatically with the uuid values prefilled. On insertion of new data, uuid should automatically be generated for the data.
I would have inherited the CI_Model and overriden the insert method, but the CI_Model in this codebase is strangely empty and there is no insert method to override and call the parent method implementation. It seems the insert method was added through dependency injection and it can't really be overriden for each model. How do I achieve automatic creation of the uuid fields for already existing tables and records and for new records being inserted into the database. I have more than 50 tables and doing it manually would be painfully difficult. |
Messages In This Thread |
Automatic insertion of UUID into legacy database - by MusahMusah - 12-10-2021, 11:17 AM
RE: Automatic insertion of UUID into legacy database - by InsiteFX - 12-11-2021, 02:56 AM
RE: Automatic insertion of UUID into legacy database - by MusahMusah - 12-11-2021, 06:39 AM
RE: Automatic insertion of UUID into legacy database - by InsiteFX - 12-12-2021, 01:52 AM
RE: Automatic insertion of UUID into legacy database - by MusahMusah - 12-12-2021, 07:17 AM
RE: Automatic insertion of UUID into legacy database - by InsiteFX - 12-13-2021, 02:13 AM
RE: Automatic insertion of UUID into legacy database - by MusahMusah - 12-13-2021, 02:18 AM
|