Did you write this code yourself? If you did, it might be quicker to simply rewrite the application than attempting to figure out what the tables looked like. Even if you didn't write the code, you might be better off doing the application from scratch anyway.

I've been in similar situations, and sometimes I realize I simply had to bite the bullet and start over than to go through the code to reconstruct the SQL tables. It can take a lot less time to simply rewrite than to figure out what the tables looked like, testing your assumptions, and rebuilding everything again.

On the plus side, I usually happen to like the rewritten code much better. I have a better understanding of the application, and how the code interacts with itself. Plus, features and modifications that were squeezed into the code are now part of the base code.

One of the lessons learned is that your code should generate all the needed SQL tables, views, etc, and fill it with the needed preliminary data. It may seem like a waste of time spending a lot of effort on code that should only be run once, but this type of stuff happens a lot more often than you think.


In reply to Re: Parse PHP or Perl and Reconstruct MySQL Schema by qazwart
in thread Parse PHP or Perl and Reconstruct MySQL Schema by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.