DB Diff Renderer

Discuss the development of future releases of phpBB (phpBB 3.x minor releases) and MODing/Coding related questions.
User avatar
Mighty Gorgon
New member
New member
Posts: 44
Joined: 25 Jul 2007, 12:34
Real name: Luca
Location: Italy
Contact:

DB Diff Renderer

Postby Mighty Gorgon » 29 Jul 2008, 23:13

Hi all,
I often use the "Mod Diff Renderer" created by evil<3 and I find that tool really powerful and useful.

I'm wondering if there is such a tool for DB structures: I need the structure of two DB to be compared and possibly having an output of the SQL to run to make the two DB identical.

Since I am creating a mod which requires many modifications to the DB, I'm wondering if there is an easy way to generate DB schemas without writing all the SQL manually.

Is there a ready to use tool for this? Is there something that I could use as a starting point to avoid to rewrite such a tool from scratch?

Thank you very much.
Luca

User avatar
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: DB Diff Renderer

Postby igorw » 30 Jul 2008, 12:47

It would probably be possible to write a script for it and that would be very cool. I would probably just get a DB structure backup of each of the DBs and do a diff. Then write up the queries, it's really easy to do.

A starting point would be looking at how phpBB creates db structure backups. :)

- we're poor!

User avatar
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: DB Diff Renderer

Postby igorw » 30 Jul 2008, 20:51


- we're poor!

User avatar
Mighty Gorgon
New member
New member
Posts: 44
Joined: 25 Jul 2007, 12:34
Real name: Luca
Location: Italy
Contact:

Re: DB Diff Renderer

Postby Mighty Gorgon » 31 Jul 2008, 11:05

Luca

User avatar
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: DB Diff Renderer

Postby igorw » 31 Jul 2008, 12:05


- we're poor!

User avatar
Mighty Gorgon
New member
New member
Posts: 44
Joined: 25 Jul 2007, 12:34
Real name: Luca
Location: Italy
Contact:

Re: DB Diff Renderer

Postby Mighty Gorgon » 31 Jul 2008, 22:11

Luca

User avatar
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: DB Diff Renderer

Postby igorw » 31 Jul 2008, 23:41

Here's what we have right now, but it sucks and it will change: http://svn2.assembla.com/svn/evilmods/3 ... ols/trunk/

- we're poor!

blazes816
Past Contributor
Past Contributor
Posts: 187
Joined: 07 Oct 2006, 03:00
Real name: Tyler
Location: Wichita, Kansas
Contact:

Re: DB Diff Renderer

Postby blazes816 » 31 Jul 2008, 23:53

Me and Igor's version will use a centralized database, updated to be the latest default schema. Gordon, you're welcome to use it too if you wish.

I'm yet to populate it, so it's still empty but here are the details:
MySQL 4.1.11

Host: external-db.s34738.gridserver.com
User: db34738_db_diff
Password: publicPassword
DBname: db34738_db_diff

I will update when it's populated.
User Number 9e071a3a594a8964cbefe784f8a6afaa94c0de17
My MODs:

User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: DB Diff Renderer

Postby Obsidian » 01 Aug 2008, 04:04


User avatar
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: DB Diff Renderer

Postby igorw » 01 Aug 2008, 09:45

That's a bit of a hard thing to do, where are you supposed to split it. I think it's an interesting thought though, you should submit it to the [url=http://www.phpbb.com/bugs/phpbb3/tickets.php]3.0 bug tracker[/url].

- we're poor!

User avatar
Mighty Gorgon
New member
New member
Posts: 44
Joined: 25 Jul 2007, 12:34
Real name: Luca
Location: Italy
Contact:

Re: DB Diff Renderer

Postby Mighty Gorgon » 01 Aug 2008, 10:41

Luca

blazes816
Past Contributor
Past Contributor
Posts: 187
Joined: 07 Oct 2006, 03:00
Real name: Tyler
Location: Wichita, Kansas
Contact:

Re: DB Diff Renderer

Postby blazes816 » 01 Aug 2008, 16:58

Okay, the database has been populated with the latest, stable, released schema.
User Number 9e071a3a594a8964cbefe784f8a6afaa94c0de17
My MODs:

User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: DB Diff Renderer

Postby Obsidian » 01 Aug 2008, 20:10


blazes816
Past Contributor
Past Contributor
Posts: 187
Joined: 07 Oct 2006, 03:00
Real name: Tyler
Location: Wichita, Kansas
Contact:

Re: DB Diff Renderer

Postby blazes816 » 08 Aug 2008, 01:22

In a bout of boredom I've started to put something together. I currently creates a .sql file that adds new tables and drops old ones. I'm going to work on adding/removing columns later.
User Number 9e071a3a594a8964cbefe784f8a6afaa94c0de17
My MODs:

User avatar
Mighty Gorgon
New member
New member
Posts: 44
Joined: 25 Jul 2007, 12:34
Real name: Luca
Location: Italy
Contact:

Re: DB Diff Renderer

Postby Mighty Gorgon » 09 Aug 2008, 08:10

Luca


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “phpBB Development discussion”

Who is online

Users browsing this forum: No registered users and 11 guests