how can i make a db update file

Discussions about the phpBB2 Forum. How to get the best from this powerful script.

Moderator: Moderators

how can i make a db update file

Postby AmirAbbas » Sat May 20, 2006 1:35 pm

i want to make premodded phpbb
i have some question

it this time i've installed over 20 mod
some of this mod has a database update file and some of them has a SQL queries

i want to make a one install file for all standard phpbb table and for all of my mods
i want to install another template as a default template instead of phpbb.

i found a script that is useful for make DB_update files
you must give the sql queries to this script and then this script will make a db_update for you
but i couldn't find a tool for extract sql queries from db update files

have you any suggestion ?
thank you
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Advertisement

Postby dcz » Sat May 20, 2006 2:24 pm

Well, if you want to make your install as compatible as phpBB itself, you should edit the sql schemas located in the original phpBB2/install/schemas.

You would just have to properly add the table definitions and default settings for mod's tables and to mod phpBB table settings for them to be directly created with the modified settings.

Should not be that hard, open the files up, and open as well a db backup of your moded forum, you'll find in there what could be the proper alteration for phpBB tables. Concerning new tables, the sql provided in the mod file should suffice.

You should at least be able to create an auto install for mysql without suffering too much ;)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21398
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Fri May 26, 2006 3:12 pm

ok i found two schema file in install folder

1- mysql_schema.sql
2- basic_schema.sql

the first one will make all the tables abd the second one will add default values to
config table
am i right ?

i think i must add all off sql queries at the end of mysql_schema.sql file

but there is a problem

some mods have a db_update.php file
how can i extract the sql queries from these files ?

thanks dcz
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby dcz » Fri May 26, 2006 10:55 pm

amir abbas wrote:ok i found two schema file in install folder

1- mysql_schema.sql
2- basic_schema.sql

the first one will make all the tables abd the second one will add default values to
config table
am i right ?


Yes you are ;)

A bit more than just the config default setupe, the default cat, forum and post as well.

amir abbas wrote:i think i must add all off sql queries at the end of mysql_schema.sql file

but there is a problem

some mods have a db_update.php file
how can i extract the sql queries from these files ?

thanks dcz


You are welcome ;)

So that's why I told you to start working with a full db backup of a sample install (without any more post than the demo one but fully working, once all of your premod code is final) of your premod, so that all of the sql you'd have manually or through a php script will be added in it.

Then you'd just have to copy and paste (you have to follow exactly the way it is written down in the phpBB install files so you might have to change small things as well; with phpmyadmin you can end up with "`" to protect fields, if so get rid of those) code from the db backup to the phpBB sql install files.

You'll face several cases :

A mod added a table, then, you should find the sql definition of it in the db backup followed by the insert for the default settings. Just paste it all in the mysql_schema.sql. You can paste the inserts in mysql_basic.sql, but I am not sure this is really required, it could work as well if you just paste all of it (table definition + inserts) in mysql_schema.sql.

A mod modified a phpBB table, then, copy and overwrite this table definition from the db backupt to the mysql_schema.sql, and do the same with the eventual associated inserts in mysql_basic.sql.

All other non modded nor added phpBB table should be left as is in the original phpBB sql install files.

Quite simple in the end ;)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21398
Joined: Fri Apr 28, 2006 9:03 pm

Postby AmirAbbas » Sat May 27, 2006 6:56 am

thank you :)
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN


Return to phpBB2 Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests


 
cron