Reverse Engineering database structure to ...
| Author |
Message |
NanoCaiordo


Joined: Jun 29, 2004 Posts: 3676 Location: Melbourne, AU
|
Post subject: Reverse Engineering database structure to ... Posted: Fri Jul 09, 2010 1:16 pm |
|
Reverse Engineering database structure to ... DragonflyCMS installer compatible file!
Developers may use this new function found in admin -> database to port their module tables structure to DragonflyCMS installer file format.
Will save a copy into the cache folder, just copy and paste into cpg_inst.php.
The module installer is also reworked again and work is still in progress.
preview: dragonflycms.org/cvs/h....php?v=1.2
By enabling pre_ and post_ functions they will be executed, when? function name is auto explanatory
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 5.1 / PHP 5.3 / NextGen() |
|
| Back to top |
|
 |
layingback


Joined: Apr 19, 2004 Posts: 953
|
Post subject: Re: Reverse Engineering database structure to ... Posted: Fri Jul 09, 2010 1:23 pm |
|
Sounds good. Been waiting for this. But will it be able to handle updates for existing users? Ie.
if ($prev_version <= '3.3.1.1') {
stuff
_________________ Pro_News: The complete module for Dragonfly - now available as version 3.3
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) 2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1 |
|
| Back to top |
|
 |
NanoCaiordo


Joined: Jun 29, 2004 Posts: 3676 Location: Melbourne, AU
|
Post subject: Re: Reverse Engineering database structure to ... Posted: Fri Jul 09, 2010 1:37 pm |
|
The new installer makes thinks a bit harder when you need to create the database structure using the new (4 years old) standards.
This is why I've just created this tool. Help me and everyone else to get started.
It will be supported inside inside each function ... but lets the fun start.
Possibilities are infinite and explain them all will take a while.
You or anyone else with a question, shoot me a detailed example about a process you may want to run inside an upgrade and I will show you, luckily, how simple its going to be when using the new installer structure.
Otherwise I'll be aware about issues before it's too late
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 5.1 / PHP 5.3 / NextGen() |
|
| Back to top |
|
 |
greenday2k


Joined: Aug 11, 2005 Posts: 484 Location: CO
|
|
| Back to top |
|
 |
NanoCaiordo


Joined: Jun 29, 2004 Posts: 3676 Location: Melbourne, AU
|
Post subject: Re: Reverse Engineering database structure to ... Posted: Fri Jul 09, 2010 4:51 pm |
|
The install is fully automated, just provide a $tables structure within cpg_inst or in a data.inc file inside the same directory and the installer will load and install it for you.
pre_ and post_ are ran respectively before and after the installer creates tables and insert data .. same for upgrade and uninstall. Just optional functions.
Interactive? No.
However module name can be changed easily by renaming the folder, the class name and $this->modname to have a uniform name displayed everywhere.
Some more details:
If you add a new column, a new key, a new table ... you will not need to do anything else then update $tables and change $this->version to a higher version number.
That is it, installer will then see an different version, prompt for the upgrade and perform all operation necessary to match your provided $tables with the actual database table ... compatible with MySQL and PostgreSQL.
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 5.1 / PHP 5.3 / NextGen() |
|
| Back to top |
|
 |
layingback


Joined: Apr 19, 2004 Posts: 953
|
Post subject: Re: Reverse Engineering database structure to ... Posted: Fri Jul 09, 2010 7:05 pm |
|
What version did this first appear? Ie. at what version can we drop the old way?
Can I have 2 installers? I want to switch to the new system - I hate messing with the installer - but what about my users who are on 9.1.2.1 or even 9.0.6.1 - how should I handle those?
_________________ Pro_News: The complete module for Dragonfly - now available as version 3.3
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) 2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1 |
|
| Back to top |
|
 |
NanoCaiordo


Joined: Jun 29, 2004 Posts: 3676 Location: Melbourne, AU
|
Post subject: Re: Reverse Engineering database structure to ... Posted: Sat Jul 10, 2010 2:31 am |
|
Been used from DragonflyCMS 9.1.0.1.
No, only one single installer.
9.0.6.1 they should really upgrade.
I personally managed to upgrades 8.x websites, some had issues due mod and hacks and user errors and ... improving the installer.
For example the user delete hack screwed up otherwise easy upgrades, had to modify the installer again.
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 5.1 / PHP 5.3 / NextGen() |
|
| Back to top |
|
 |
NanoCaiordo


Joined: Jun 29, 2004 Posts: 3676 Location: Melbourne, AU
|
Post subject: Re: Reverse Engineering database structure to ... Posted: Sat Jul 10, 2010 6:32 am |
|
Now admin cache support viewing and deleting installer type cached files.
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 5.1 / PHP 5.3 / NextGen() |
|
| Back to top |
|
 |