Dealing with differences between MySQL and vBulletin Templates in version control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • merk
    Senior Member
    • Jul 2001
    • 4149

    Dealing with differences between MySQL and vBulletin Templates in version control

    Having completly moved into SVN mode for working on my website, I have come across a dilemma with regard to templates and mysql changes.

    Does anyone have any tips on the best way to tackle it? At the moment i have a MYSQLCHANGES file in the repository that i use to track changes i make to mysql locally and when i commit/update i run those same queries on the live database.

    Is there a better way to deal with MySQL changes?

    How about templates in the database? Im really stuck to deal with this one. I have no idea. Is it possible to write a script to fetch template changes and then put them back into a database? (I guess this applies to a working copy without version control too!)
  • Colin F
    Senior Member
    • May 2004
    • 17689

    #2
    As the templates are saved in one of those huge xml files, you might be able to compare those...
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment

    • merk
      Senior Member
      • Jul 2001
      • 4149

      #3
      But those template xml files are for the raw style as provided by jelsoft, not including modifications for anything i do.

      Though, i guess i could export the style and any customisations made to it before i commit.

      Comment

      • Colin F
        Senior Member
        • May 2004
        • 17689

        #4
        Yes, possibly.

        Or if you compare the two default files, you would see what changes were made and could manually add them.
        Best Regards
        Colin Frei

        Please don't contact me per PM.

        Comment

        • merk
          Senior Member
          • Jul 2001
          • 4149

          #5
          Searching through the subversion manual, i guess i could run a post-commit hook.



          But, that would only be on the repository side of things, not on the working copy side.

          /me ponders.

          Comment

          • dwh
            Senior Member
            • Sep 2000
            • 1224
            • 3.0.0 Release Candidate 4

            #6
            Originally posted by merk
            Having completly moved into SVN mode for working on my website, I have come across a dilemma with regard to templates and mysql changes.

            Does anyone have any tips on the best way to tackle it? At the moment i have a MYSQLCHANGES file in the repository that i use to track changes i make to mysql locally and when i commit/update i run those same queries on the live database.

            Is there a better way to deal with MySQL changes?

            How about templates in the database? Im really stuck to deal with this one. I have no idea. Is it possible to write a script to fetch template changes and then put them back into a database? (I guess this applies to a working copy without version control too!)
            I haven't set up subversion on the server though I try to use it locally. Still learning the system though.

            For MySQL it depends on the table, but I actually want to compare data sometimes and after firing up phpmyadmin, first sort data on a suitable column. Sometimes id is best, sometimes title is best. I compare it to my test server and do the same data sort.

            Then I export table structure and data. In some cases I only do table structure. I save all the files in name.sql format. Then I can easily compare them and by being careful about the sorting, it's easy to compare. Templates might even be comparable that way, but I found a better way to handle that.

            If you turn on debug mode, there is an undocumented feature to backup data files to flatfiles...you must create a directory called template_dump in the forums directory. Make sure it is writable. Don't forget to turn debug mode on.

            Then go to this url:



            Add the files to subversion and presto bingo, templates are done.

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...