Attention

This document was written for an old version of Plone, Plone 3, and was last updated 1205 days ago.

To learn how to upgrade to the current version of Plone, read the upgrade manual.

Creating the database (1)

by Laurence Rowe last modified Feb 04, 2009 03:05 AM
Database creation and a users table

I created the schema through pgAdmin III. Most of the SQL that follows is generated by that tool.

User

CREATE ROLE plone
  WITH PASSWORD 'plone';

Database

CREATE DATABASE timesheets
  WITH OWNER = plone
       ENCODING = 'UTF8';

Users table

CREATE TABLE users
(
  userid character varying(255) NOT NULL, -- User ID...
  fullname character varying(255), -- Full name...
  CONSTRAINT users_pkey PRIMARY KEY (userid)
)
WITH (OIDS=FALSE);
ALTER TABLE users OWNER TO plone;
COMMENT ON COLUMN users.userid IS 'User ID

As this is the primary key column, it may not be modified';
COMMENT ON COLUMN users.fullname IS 'Full name

optional';

Comments on columns are structured so that the first line can be picked up by collective.mercury and used as the title, followed by a blank line, followed by a description.


Contribute

Something wrong or out of date? Anybody can edit or create a new article in the knowledge base. Simply create an account on this site, log in, and click the Edit button to contribute.