ANNOUNCE: Tinderbox 2.2.0 Release Candidate 2 available
Edwin Groothuis
edwin at mavetju.org
Thu Dec 1 05:02:16 EST 2005
On Thu, Dec 01, 2005 at 02:58:55AM -0500, Joe Marcus Clarke wrote:
> Man I suck. R4 is up now.
Has this SQL upgrade stuff ever been tested? (not trying to be rude here)
In upgrade.sh:
DB_MIGRATION_PATH="1.X ${VERSION}"
That should, by now, be:
DB_MIGRATION_PATH="1.X 2.0.0 2.1.0 2.1.1 ${VERSION}"
In upgrade.sh / mig_shlib.sh:
mig_db ${do_load} ${db_driver} ${db_admin} ${db_host} ${db_name}
calls to:
mig_db() {
do_load=$1
db_driver=$2
[... missing something here ...]
db_host=$3
db_name=$4
mig_file=${pb}/scripts/upgrade/mig_${db_driver}_tinderbox-${MIG_VERSION_FROM}_to_${MIG_VERSION_TO}.sql
And later on in mig_shlib.sh:
if ! load_schema "${mig_file}" ${db_driver} ${db_host} ${db_name}
calls to lib/setup_shlib.sh:
load_schema() {
schema_file=$1
db_driver=$2
db_admin=$3
db_host=$4
db_name=$5
Missing admin here in the call.
If that is fixed later, then it will run like:
Congratulations! Tinderbox migration is complete. Please refer
to http://tinderbox.marcuscom.com/ for a list of what is new
in this version as well as general Tinderbox documentation.
Except that it didn't like:
CREATE TABLE
ERROR: syntax error at or near "MODIFY" at character 181
LINE 3: MODIFY Last_Status VARCHAR(16) CHECK (Last_Status IN ('UNK...
^
Which is this one:
ALTER TABLE build_ports
ADD Last_Fail_Reason VARCHAR(20) NOT NULL DEFAULT '__nofail__' REFERENCES port_fail_reasons(Port_Fail_Reason_Tag) ON UPDATE CASCADE ON DELETE RESTRICT,
MODIFY Last_Status VARCHAR(16) CHECK (Last_Status IN ('UNKNOWN','SUCCESS','FAIL','BROKEN','LEFTOVERS','DUD')) DEFAULT 'UNKNOWN';
Not sure what has to happen here, MODIFY sounds MySQL-ish. Perhaps
somebody with more postgresql knowledge can help here.
At least with the first two lines of that SQL statement I got my
tinderboxes running again (well the webinterface does :-)
Edwin
--
Edwin Groothuis | Personal website: http://www.mavetju.org
edwin at mavetju.org | Weblog: http://weblog.barnet.com.au/edwin/
More information about the tinderbox-list
mailing list