Closed (won't fix)
Project:
Forms (obsolete)
Version:
4.6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2005 at 03:44 UTC
Updated:
10 Jul 2006 at 23:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
commanderfoxtrot commentedgrcm forms # cat forms.pgsql
CREATE TABLE forms (
fid int NOT NULL,
type varchar(16) NOT NULL,
created int NOT NULL,
PRIMARY KEY (fid)
);
CREATE TABLE form_fields (
ffid int NOT NULL,
fid int NOT NULL,
title varchar(255) default NULL,
explanation TEXT default NULL,
page varchar(255) default NULL,
type varchar(128) default NULL,
weight smallint DEFAULT '0' NOT NULL,
required smallint DEFAULT '0' NOT NULL,
flags text,
validation text,
options text,
multiple smallint DEFAULT '0' NOT NULL,
PRIMARY KEY (ffid)
);
CREATE SEQUENCE form_fields_ffid_seq INCREMENT 1 START 1;
I don't know if this works, but it runs without errors, so try it.
Comment #2
klance commentedI didn't read this before modifying the create script, but I think mine is the same as commanderfoxtrot's, except that I created a sequence for the forms table's primary key, because it was defaulting to '0' for every form, causing unique constraint violations on the primary key.
BTW I have tested the Forms API in PostgreSQL with the Survey module and translated surveys successfully with the I18N module, in case anyone's interested.
CREATE SEQUENCE forms_fid_seq INCREMENT 1 START 1;
CREATE TABLE forms (
fid INTEGER NOT NULL default nextval( 'forms_fid_seq' ),
type VARCHAR(16) NOT NULL,
created INTEGER NOT NULL,
PRIMARY KEY (fid)
);
CREATE SEQUENCE form_fields_ffid_seq INCREMENT 1 START 1;
CREATE TABLE form_fields (
ffid INTEGER NOT NULL DEFAULT nextval( 'form_fields_ffid_seq' ),
fid INTEGER NOT NULL,
title VARCHAR(255) DEFAULT NULL,
explanation TEXT DEFAULT NULL,
page VARCHAR(255) DEFAULT NULL,
type VARCHAR(128) DEFAULT NULL,
weight SMALLINT DEFAULT '0' NOT NULL,
required SMALLINT DEFAULT '0' NOT NULL,
flags TEXT,
validation TEXT,
options TEXT,
multiple SMALLINT DEFAULT '0' NOT NULL,
PRIMARY KEY (ffid)
);
Comment #3
darren ohWork has moved on to newer projects.