View Full Version : How tables are modified after making an article
zero477
09-03-2012, 04:16 PM
Hello to all,
I would like to know if there is a way of learning what happens when I do something in vBulletin ...
For example ... what tables are modified when I create an article ??
I want to know this because I need to migrate many articles ...
Greetings,
Eddie
I was kind of hoping that someone would answer this, because I'm not a database person and I was wondering if there was some way to montior changes to the database. But I can think of a couple of ways I might try: one is to put the site in debug mode and create an article, then look at the list of queries that were done and figure out which ones had to do with creating the article. Another would be to save the database to sql (probably using a test site without a lot of posts or threads), then create an article and save the sql again, and diff the two sql files (I have no idea how well this would work - it may be that table rows don't always come out in the same order when you dump a database so there'd be too many changes).
Of course you can always look at the code and see what's done when an article is created.
Lynne
09-07-2012, 03:24 PM
Almost all the cms_* tables get modified when an article is created. If you really wanted to see exactly what happens, you would need to 'read' the code that is run when you click that Submit button.
Dead Eddie
09-08-2012, 01:15 AM
I'd start with the cms_node, cms_nodeinfo, and cms_article tables.
The insert into the cms_node table is interesting...as I recall, initial data is inserted into the table when the create article page is loaded, before the article is saved. When the article is saved, the row is updated with the correct data.
Also, the noderight and nodeleft columns are used to describe the position of a node relative to other nodes...so when you calculate its position, you'll potentially have to update other records to make room for it.
Otherwise, it's mostly straightforward. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.