summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-14 18:36:53 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-14 18:36:53 +0000
commit23145d356c9461d83545f76207afce42d391a20d (patch)
tree4a0d703a7058ecb57e91988143a734d91471669d /sql
parentad7dff95ec2488d6c982abb07a0b42c6f643cbc2 (diff)
Removing obsolete user creation stored procs and inserts
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1600 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql')
-rw-r--r--sql/Pg-database.sql16
-rw-r--r--sql/modules/admin.sql4
2 files changed, 4 insertions, 16 deletions
diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql
index e57d0b1c..76b22079 100644
--- a/sql/Pg-database.sql
+++ b/sql/Pg-database.sql
@@ -131,27 +131,13 @@ COMMENT ON COLUMN users_conf.password IS 'This means we have to get rid of the c
--INSERT INTO users(username) VALUES ('admin'); -- entity_id is declared NOT NULL !!
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-
-
-
INSERT INTO users_conf(id,password) VALUES (currval('users_id_seq'),NULL);
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-CREATE OR REPLACE FUNCTION create_user(text) RETURNS bigint AS $$
- INSERT INTO users(username) VALUES ($1);
- SELECT currval('users_id_seq');
- $$ LANGUAGE 'SQL';
-COMMENT ON FUNCTION create_user(text) IS $$ Function to create user. Returns users.id if successful, else it is an error. $$;
-CREATE OR REPLACE FUNCTION update_user(int4,text) RETURNS int4 AS $$
- UPDATE users SET username = $2 WHERE id = $1;
- SELECT 1;
- $$ LANGUAGE 'SQL';
-COMMENT ON FUNCTION update_user(int4,text) IS $$ Takes int4 which is users.id and text which is username. Will update username based on id. Username is unique $$;
-- Session tracking table
diff --git a/sql/modules/admin.sql b/sql/modules/admin.sql
index 103c10c1..6b6aecfb 100644
--- a/sql/modules/admin.sql
+++ b/sql/modules/admin.sql
@@ -400,4 +400,6 @@ $$ language 'plpgsql';
comment on function admin_delete_group(text) IS $$
Deletes the input group from the database. Not designed to be used to
remove a login-capable user.
-$$; \ No newline at end of file
+$$;
+
+-- TODO: Add admin user