Welcome Guest, Not a member yet? Register   Sign In
Automatic insertion of UUID into legacy database
#1

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.
Reply


Messages In This Thread
Automatic insertion of UUID into legacy database - by MusahMusah - 12-10-2021, 11:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB