summaryrefslogtreecommitdiff
path: root/sql/Pg-tables.sql
diff options
context:
space:
mode:
authorlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-21 18:24:38 +0000
committerlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-21 18:24:38 +0000
commitcce5f5bd1e39970939efe0cd4a6bdfbf3efba005 (patch)
tree991ea1eb322d72335f0d76268dcf2a223ae03a85 /sql/Pg-tables.sql
parent2fc605b7ae3b92f85701cacf3a69c76fcb857f65 (diff)
Note to Chrish ... Added users table, added users_conf table which is to replace users/username.conf etc... added comments
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@260 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql/Pg-tables.sql')
-rwxr-xr-xsql/Pg-tables.sql42
1 files changed, 41 insertions, 1 deletions
diff --git a/sql/Pg-tables.sql b/sql/Pg-tables.sql
index 78b7835f..b56a4d5c 100755
--- a/sql/Pg-tables.sql
+++ b/sql/Pg-tables.sql
@@ -568,7 +568,8 @@ CREATE TABLE session(
session_id serial PRIMARY KEY,
sl_login VARCHAR(50),
token VARCHAR(32) CHECK(length(token) = 32),
-last_used TIMESTAMP default now()
+last_used TIMESTAMP default now(),
+users_id integer not null references users(id),
);
@@ -710,3 +711,42 @@ INSERT INTO taxmodule (
) VALUES (
1, 'Simple'
);
+
+-- USERS stuff --
+CREATE TABLE users (id serial UNIQUE, username varchar(30) primary key);
+COMMENT ON TABLE users IS 'username is the actual primary key here because we don't want duplicate users';
+CREATE TABLE users_conf(id integer primary key references users(id) deferrable initially deferred,
+ acs text,
+ address text,
+ businessnumber text,
+ company text,
+ countrycode text,
+ currency text,
+ dateformat text,
+ dbconnect text,
+ dbdriver text default 'Pg',
+ dbhost text default 'localhost',
+ dbname text,
+ dboptions text,
+ dbpasswd text,
+ dbport text,
+ dbuser text,
+ email text,
+ fax text,
+ menuwidth text,
+ name text,
+ numberformat text,
+ password varchar(32) check(length(password) = 32),
+ print text,
+ printer text,
+ role text,
+ sid text,
+ signature text,
+ stylesheet text,
+ tel text,
+ templates text,
+ timeout numeric,
+ vclimit numeric);
+COMMENT ON TABLE users_conf IS 'This is a completely dumb table that is a place holder to get usersconf into the database. Next major release will have a much more sane implementation';
+COMMENT ON COLUMN users_conf.id IS 'Yes primary key with a FOREIGN KEY to users(id) is correct';
+COMMENT ON COLUMN users_conf.password IS 'This means we have to get rid of the current password stuff and move to presumably md5()';