From: David M. <dma...@so...> - 2003-11-05 01:15:55
|
I've been trying the same thing. Here is what I have so far. Some of the modules seem to have correct sql syntax in their install.sql files. Others need things changed like mediumtext and longtext to just text. "Tinyint(*)" needs to be changed to "smallint", "int(*)" needs to be changed to "int" and the "unsigned" keyword needs to be removed. The biggest problem I've been having is in the "setup/install.sql" file. I do not know the equivalent syntax for lines such as "index(mod_title,id)". Someone has mentioned about removing these line but problems occur later on with index functions. Postgresql uses something like "create index idx on table(field)" but I don't know what I should use for the idx variable. I tried it without using the variable idx but I get table errors. Someone has just helped me with another problem which is in "core/Database.php" on line 769 which reads $sql = "ALTER TABLE $table_name ADD INDEX (" . implode(", ", $columns) . ")"; This needs to be changed to foreach ($columns as $item){ $sql = "CREATE INDEX on " . $core->tbl_prefix . "$table_name ($item)"; $this->query($sql);} David On Tue, 2003-11-04 at 18:09, Brian Ghidinelli wrote: > Greetings, I've just joined the list and have scanned the archives for > PG-related info in the past. I've spent about 6-8 hours trying to convert > phpwebsite 0.9.3 to support postgres. So far, so good, although I've run > into some issues around the sequence support. For the most part, I've > modified everything enough to install all of the modules but the database > routines don't quite work yet. > > I've done a number of things including: > > * Rewrite sqlGetIndex() to work for postgres (although this will be > database-specific and might be worth dropping such a routine) > > * Update all of the module install.sql and setup/install.sql to be more > ANSI-compliant and use SQL-standard syntax for creating indexes > > Two pieces of documentation would be extremely helpful in moving forward: > > 1. An ER diagram of the database model for PWS that states, in a > database-independent fashion, what the relationships and datatypes should > be. For example, it's hard to know which fields should be unique primary > keys and which should just be indexed from the SQL scripts. > > 2. Dev roadmap that gives some rough direction of which files, systems or > libraries need to be worked on to achieve database-independence. That way > contributors can do some heavy lifting. > > I know that 0.9.4 which is supposed to be db-independent is on something of > a ~Spring release schedule but I need good postgres support before then. > I'm hoping to take advantage of my enthusiasm if I can get a little > direction and perhaps I can piggyback on Richard S' work to date. > > One big question I have is how are the auto-incrementing fields used? Are > they necessary? I saw some discussion in the archives from August but no > clear decisions? > > Is there a semi-stable tagged CVS build that is more recent than what's on > the website I can work from? > > Thanks, > > > Brian > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers |