mess with sql scripts in db/

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

mess with sql scripts in db/

luci aka Lukas Masek
hello devs,

i'm confused or it seems there are some obsolete sql scripts left in db/
and it seems some devs do not know which to use so someone commits
changes into one and other into the other...
imho we use only those with names like tiki-1.9-<dbname>.sql and the
others named tiki_<dbname>.sql are obsolete and they got it in CVS just
like some automatic converting tests, am i right ?
can i remove them from CVS to prevent confusion which one devs should edit ?
for example it seems rlpowell and mdavey edited tiki_mysql.sql
accidentally and commited in march and april 2005

luci
--
:. :.: ::: :
luciash d' being aka luci alias Lukas Masek



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Tikiwiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: mess with sql scripts in db/

Michael Davey
luciash wrote:

> hello devs,
>
> i'm confused or it seems there are some obsolete sql scripts left in
> db/ and it seems some devs do not know which to use so someone commits
> changes into one and other into the other...


My understanding is that one edits the main db script then runs the
conversion tool in the bin subdirectory, which then creates the
individual scripts for each db type.  Finally, one commits the
auto-created sql scripts to cvs.

--
Michael



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Tikiwiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: mess with sql scripts in db/

luci aka Lukas Masek
Michael Davey wrote:

> luciash wrote:
>
>> hello devs,
>>
>> i'm confused or it seems there are some obsolete sql scripts left in
>> db/ and it seems some devs do not know which to use so someone
>> commits changes into one and other into the other...
>
>
>
> My understanding is that one edits the main db script then runs the
> conversion tool in the bin subdirectory, which then creates the
> individual scripts for each db type.  Finally, one commits the
> auto-created sql scripts to cvs.
>
yeah, i know you can generate them with the
db/convertscripts/convertsqls.sh script and commit the resulting file in
db/. but they're never used then anyway in Tiki (tiki-install.php or
whatever else afaics).

luci
--
:. :.: ::: :
luciash d' being aka luci alias Lukas Masek



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Tikiwiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|

Advise for devs to work with db/*.sql files (Was: Re: [Tikiwiki-devel] mess with sql scripts in db/)

luci aka Lukas Masek
hi devs,

luciash wrote:

>> My understanding is that one edits the main db script then runs the
>> conversion tool in the bin subdirectory, which then creates the
>> individual scripts for each db type.  Finally, one commits the
>> auto-created sql scripts to cvs.
>>
> yeah, i know you can generate them with the
> db/convertscripts/convertsqls.sh script and commit the resulting file
> in db/. but they're never used then anyway in Tiki (tiki-install.php
> or whatever else afaics).
>
> luci

ok,
i've found myself with little help of mdavey that the
db/convertscripts/convertsqls.sh is used to batch create the
db/tiki-<version>-<dbschema>.sql files as already somone of you know.
*usage:**
    *./convertsqls.sh localhost/tikiwiki
**where the argument is turned into http://localhost/tikiwiki/ and used
to get the files in your db directory (you'll need to move .htaccess out
of the way temporarily)
or if you want to update only one sql file you can call the php file
directly using php command:
    cd db/convertscripts/
    php mysql3topgsql72.php
    cp 1.9.to_pgsql72.sql ../tiki-1.9-pgsql.sql

*that's what we use now* and everybody should first fix the code in
db/convertscripts/*.php and then regenerate the bugged sql file(s) (if
it needs to be fixed) before commit !
*do not try to fix the db/tiki-1.9-files manually because they can be
overwritten at time of next re-generation*

it means only one sql file (db/tiki.sql) is needed to edit and if
everything works ok, then the convert scripts do the job for other dbs

though, it happened in the past, some ppl (including me) didn't know
what to edit and edited the files manually or even edited files which we
even don't ever use.
these files i talk about (tiki_postgres.sql, tiki_sqlite.sql, etc.) seem
to be generated using rossta's db/Makefile for sqlfairy
(http://sqlfairy.sourceforge.net/) and were commited together with the
Makefile to make some tests if they could be used (or does somebody
actually use them ?) so they're missing many actual things because it
seems noone regenerates them periodically. (btw, sqlfairy is GPL so we
can't include it anyway to automate the process somehow.)
imho the fact they're present in db/ only causes confusion to devs and
users which simply don't know...

so my advise is to push them out of db/ and move them to
convertscripts/sqlfairy/ together with the Makefile or remove them from
CVS completely
and focus on improving and adding the "our own" convertscripts written
in php for now (i'd like to add firebird support finally).

btw, automatic regeneration and commit of the resulting sql files when
someone commits change for db/tiki.sql would be cool as mdavey pointed
out on IRC but i dunno if that's possible...

luci

ps: or we should find another possibility how to fully support multiple
dbs but that's another story...
--
:. :.: ::: :
luciash d' being aka luci alias Lukas Masek



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Tikiwiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|

Re: Advise for devs to work with db/*.sql files (Was: Re: [Tikiwiki-devel] mess with sql scripts in db/)

Marc Laporte
Hi Luci!

Can you (or someone) make a wiki page on dev.tikiwiki.org about what dev
should do?

Thanks!

M ;-)



luciash wrote:

> hi devs,
>
> luciash wrote:
>
>>> My understanding is that one edits the main db script then runs the
>>> conversion tool in the bin subdirectory, which then creates the
>>> individual scripts for each db type.  Finally, one commits the
>>> auto-created sql scripts to cvs.
>>>
>> yeah, i know you can generate them with the
>> db/convertscripts/convertsqls.sh script and commit the resulting file
>> in db/. but they're never used then anyway in Tiki (tiki-install.php
>> or whatever else afaics).
>>
>> luci
>
>
> ok,
> i've found myself with little help of mdavey that the
> db/convertscripts/convertsqls.sh is used to batch create the
> db/tiki-<version>-<dbschema>.sql files as already somone of you know.
> *usage:**
>    *./convertsqls.sh localhost/tikiwiki
> **where the argument is turned into http://localhost/tikiwiki/ and
> used to get the files in your db directory (you'll need to move
> .htaccess out of the way temporarily)
> or if you want to update only one sql file you can call the php file
> directly using php command:
>    cd db/convertscripts/
>    php mysql3topgsql72.php
>    cp 1.9.to_pgsql72.sql ../tiki-1.9-pgsql.sql
>
> *that's what we use now* and everybody should first fix the code in
> db/convertscripts/*.php and then regenerate the bugged sql file(s) (if
> it needs to be fixed) before commit !
> *do not try to fix the db/tiki-1.9-files manually because they can be
> overwritten at time of next re-generation*
>
> it means only one sql file (db/tiki.sql) is needed to edit and if
> everything works ok, then the convert scripts do the job for other dbs
>
> though, it happened in the past, some ppl (including me) didn't know
> what to edit and edited the files manually or even edited files which
> we even don't ever use.
> these files i talk about (tiki_postgres.sql, tiki_sqlite.sql, etc.)
> seem to be generated using rossta's db/Makefile for sqlfairy
> (http://sqlfairy.sourceforge.net/) and were commited together with the
> Makefile to make some tests if they could be used (or does somebody
> actually use them ?) so they're missing many actual things because it
> seems noone regenerates them periodically. (btw, sqlfairy is GPL so we
> can't include it anyway to automate the process somehow.)
> imho the fact they're present in db/ only causes confusion to devs and
> users which simply don't know...
>
> so my advise is to push them out of db/ and move them to
> convertscripts/sqlfairy/ together with the Makefile or remove them
> from CVS completely
> and focus on improving and adding the "our own" convertscripts written
> in php for now (i'd like to add firebird support finally).
>
> btw, automatic regeneration and commit of the resulting sql files when
> someone commits change for db/tiki.sql would be cool as mdavey pointed
> out on IRC but i dunno if that's possible...
>
> luci
>
> ps: or we should find another possibility how to fully support multiple
> dbs but that's another story...


--
M ;-)

//////////////////////////////////////////////////////////////////
/                                                                /
/ Marc Laporte       <|>                  http://marclaporte.com /
/ Avantech.net       <|>                     http://avantech.net /
/ Tiki CMS/Groupware <|> http://tikiwiki.org/UserPagemarclaporte /
/                                                                /
//////////////////////////////////////////////////////////////////



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Tikiwiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel