[SUCS Devel] Data held on membership

Chris Jones rollercow at sucs.org
Mon Aug 27 22:51:06 BST 2007


I've settled on the following schema (the single change being  
cardnumber changed from int to bigint to accommodate long card numbers)

I''ve tidied up the members database and imported the data into the  
new tables, the old table exists as 'oldmembers' within the SUCS  
database.

This change breaks (at least) two existing tool sets,

1) Signup
2) GuestNET Registration

The former needs reworking anyway...
The second should be trivial to fix, but it might be nice to  
integrate the web front end within the SUCS site (assuming that's  
possible)

Any volunteers to help with either of these changes?

CREATE TABLE member_type (
      id serial NOT NULL PRIMARY KEY,
      typename text NOT NULL,
      blurb text NOT NULL
);

CREATE TABLE members (
	uid integer NOT NULL PRIMARY KEY,
	username text NOT NULL,
	realname text NOT NULL,
	email text,
	address text,
	phone text,
	sid integer,
	type integer REFERENCES member_type NOT NULL,
	paid text NOT NULL,
	comments text,
	lastupdate timestamp(0) DEFAULT now() NOT NULL,
	lastedit integer REFERENCES members NOT NULL
);
	
CREATE TABLE guestnet (
	mac text NOT NULL UNIQUE,
	uid integer REFERENCES members NOT NULL
);

CREATE TABLE doorcards (
	cardnumber bigint NOT NULL UNIQUE,
	uid integer REFERENCES members NOT NULL
);

--
Chris Jones, SUCS Admin
http://sucs.org






More information about the Devel mailing list