DataObject: createtables doesn't overwrite after DBMS change

From: Date: Tue, 30 Sep 2003 08:48:28 +0000
Subject: DataObject: createtables doesn't overwrite after DBMS change
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22204@lists.php.net to get a copy of this message
Hi This is really a minor thing but I thought I should mentioned it anyway.. My table in pgsql looks like this. Notice there are no keys defnied. CREATE TABLE "player_track" ( "player_id" SMALLINT DEFAULT '0' NOT NULL, "position" SMALLINT DEFAULT '0' NOT NULL, "altered" TIMESTAMP WITHOUT TIME ZONE NOT NULL ) WITH OIDS; [player_track] player_id = 1 position = 1 altered = 2 [player_track__keys] Now in the comments of the auto generated code below it says there are two Primary Keys: player_id and altered. This is a result of the code generated for MySql. I however switched to PG but the auto code isn't overwritten properly I don't think. I don't know if DO uses those comments for anything (I don't think so) but everything works fine as far as I can tell. Easy solution is to delete the classes generated for MySql and re-run createTables.php, but in some other classes I have a lot of handwritten code I don't want to delete. ###START_AUTOCODE /* the code below is auto generated do not remove the above tag */
   var $__table = 'player_track';                    // table name
   var $player_id;                       // int(5)  not_null primary_key unsigned
   var $position;                       // int(3)  not_null unsigned
   var $altered;                         // timestamp(14)  not_null primary_key unsigned zerofill timestamp


« previous php.pear.dev (#22204) next »