Recently my database got deleted due to some issues.I am using codeigniter for my project is there any way I can get the structure of my database from codeigniter source code.any help will be appreciated
1 Answer
Sorry to say but no. At least not entirely and it won't be easy. But you can extract some information that might help.
You can examine all the model files and learn what table names are used. You might also find the names of some fields. That won't tell you directly everything you need to know about the fields. But you might be able to figure out the data types.
You can also examine how the data returned from models is used in controllers and views. That might help you get a handle on data types. That might also be helpful in cases where the query is a Select * which provides no info on how many fields exist or what the names are.
Unless your application was very simple you have a long road ahead.
Let this be a lesson - Backup your projects including the database!