Closed (fixed)
Project:
Sections
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Aug 2006 at 19:09 UTC
Updated:
18 Aug 2007 at 18:03 UTC
Moving in here from a comment in the handbook.
I've got a patch to sections.install to enable PostgreSQL support. I don't know how to forward it to you but here's the code:
function sections_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {sections_data} (
`sid` int(10) default NULL,
`name` text,
`status` smallint(1) default '0',
`path` text,
`template` text,
`visibility` smallint(1) default '0',
`weight` int(10) default NULL
) ENGINE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
$id = db_next_id('sections_id');
db_query("INSERT INTO {sections_data} VALUES (%d,'Admin',1,'admin\nadmin/*','bluemarine',1,-10);", $id);
break;
case 'pgsql':
db_query("CREATE TABLE sections_data (
sid int default NULL,
name text,
status smallint default 0,
path text,
template text,
visibility smallint default 0,
weight int default NULL)");
db_query("CREATE SEQUENCE sections_id_seq START 1");
$id = db_next_id('sections_id');
db_query("INSERT INTO {sections_data} VALUES (%d, 'Admin',1,'admin\nadmin/*','bluemarine',1,-10);", $id);
break;
}
}
Comments
Comment #1
Bèr Kessels commentedI need a review or test from someone with pgsql knowledge.
Comment #2
hass commentedFor 5.x we should remove this default admin section in a replacement of the Admin-Theme feature.
Aside D6 requires to alter the tables to auto increment... get_next_id is no longer supported.
So i'd like to ask - should be change this today, or wait for D6?
And i cannot review PGSQL, too.
Comment #3
hass commentedpgsql support has been added to 5.x (http://drupal.org/cvs?commit=76345), but needs testing.
Comment #4
(not verified) commented