Hello all,
i've commited new database setup scripts for mysql and postgresql. Now are the SQL tables generated from a common XML definition, to avoid inconsistencies between the different databases. With the new system is not more necessary to update three different shell scripts for one database table change, hopefully this will lead to fewer bugs.
The dbtext integration is still missing, i'll work on this and on further extension of the system in two weeks after the programming course in paris.
I've tested the new system with mysql 5.0 and postgresql 8.2, but there are probably still some bugs present.
So if you get an database setup script related error from trunk, don't hesitate to complain here or on the devel list. :-)
You'll find further informations about this system in the wiki: http://www.openser.org/dokuwiki/doku.php/development:db-schema
Best regards,
Henning
If the serweb table is installed or not has an impact on how openserctl operates while adding users. I was thinking about adding the following enhancement to the db install script: if the serweb table is installed, perform a sed replace operation on openserctlrc for HAS_SERWEB. This will avoid the manual step of setting HAS_SERWEB and people asking the same question over and over on the mailing list.
Regards, Ovidiu Sas
On 5/31/07, Henning Westerholt henning.westerholt@1und1.de wrote:
Hello all,
i've commited new database setup scripts for mysql and postgresql. Now are the SQL tables generated from a common XML definition, to avoid inconsistencies between the different databases. With the new system is not more necessary to update three different shell scripts for one database table change, hopefully this will lead to fewer bugs.
The dbtext integration is still missing, i'll work on this and on further extension of the system in two weeks after the programming course in paris.
I've tested the new system with mysql 5.0 and postgresql 8.2, but there are probably still some bugs present.
So if you get an database setup script related error from trunk, don't hesitate to complain here or on the devel list. :-)
You'll find further informations about this system in the wiki: http://www.openser.org/dokuwiki/doku.php/development:db-schema
Best regards,
Henning
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
On Donnerstag, 31. Mai 2007, Ovidiu Sas wrote:
If the serweb table is installed or not has an impact on how openserctl operates while adding users. I was thinking about adding the following enhancement to the db install script: if the serweb table is installed, perform a sed replace operation on openserctlrc for HAS_SERWEB. This will avoid the manual step of setting HAS_SERWEB and people asking the same question over and over on the mailing list.
You're right,
this questions gets annoying.. But the user probably don't run this setup script with root privileges, that are needed if you want to modify the systemwide openserctlrc. And the user can install the rc file in at least three different places.
Perhaps we can detect in the openserctl script that the user has serweb installed (e.g. try an select on admin_privileges), and set internally this variable?
What do you think?
Henning
The location of openserctlrc is dictated by the make options: $(cfg-prefix)/$(cfg-dir)/openserctlrc (see install script).
If the script is not able to modify the openserctlrc file, maybe it should ask for root password or just print a BIG warning that the openserctl file needs to be modified.
As an alternative, we could have the test in openserctl, but I think that it really belongs to the db install script.
Also, the db install script should check/change the DBENGINE too :-) If DBENGINE is not set, then set it If the DBENGINE is set and it matches the install script, proceed, otherwise, exit with error: Trying to install a db that doesn't match DBENGINE!!! Fix your openserctlrc file.
Regards, Ovidiu Sas
On 5/31/07, Henning Westerholt henning.westerholt@1und1.de wrote:
On Donnerstag, 31. Mai 2007, Ovidiu Sas wrote:
If the serweb table is installed or not has an impact on how openserctl operates while adding users. I was thinking about adding the following enhancement to the db install script: if the serweb table is installed, perform a sed replace operation on openserctlrc for HAS_SERWEB. This will avoid the manual step of setting HAS_SERWEB and people asking the same question over and over on the mailing list.
You're right,
this questions gets annoying.. But the user probably don't run this setup script with root privileges, that are needed if you want to modify the systemwide openserctlrc. And the user can install the rc file in at least three different places.
Perhaps we can detect in the openserctl script that the user has serweb installed (e.g. try an select on admin_privileges), and set internally this variable?
What do you think?
Henning
On Donnerstag, 31. Mai 2007, Ovidiu Sas wrote:
The location of openserctlrc is dictated by the make options: $(cfg-prefix)/$(cfg-dir)/openserctlrc (see install script).
Yes, but the user can override this with the file in his homedir.
If the script is not able to modify the openserctlrc file, maybe it should ask for root password or just print a BIG warning that the openserctl file needs to be modified.
Perhaps the database setup user don't have the root password. And Ubuntu for example don't use a root password, it uses sudo. So the big warning should be better. But this probably would be ignored from many users.
As an alternative, we could have the test in openserctl, but I think that it really belongs to the db install script.
Hm, i'm fine with the test in openserctl, HAS_SERWEB is only used at one place in the ctl script and the mysqldb migrate function.
Also, the db install script should check/change the DBENGINE too :-) If DBENGINE is not set, then set it If the DBENGINE is set and it matches the install script, proceed, otherwise, exit with error: Trying to install a db that doesn't match DBENGINE!!! Fix your openserctlrc file.
:-) Sure, this would be nice.
I think we should also use a common rc file for the openserctl and dbsetup scripts.
Henning