[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1600] trunk/sql



Revision: 1600
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1600&view=rev
Author:   einhverfr
Date:     2007-09-14 11:36:53 -0700 (Fri, 14 Sep 2007)

Log Message:
-----------
Removing obsolete user creation stored procs and inserts

Modified Paths:
--------------
    trunk/sql/Pg-database.sql
    trunk/sql/modules/admin.sql

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2007-09-14 16:39:01 UTC (rev 1599)
+++ trunk/sql/Pg-database.sql	2007-09-14 18:36:53 UTC (rev 1600)
@@ -131,29 +131,15 @@
 
 --INSERT INTO users(username) VALUES ('admin'); -- entity_id is declared NOT NULL !!
 
+INSERT INTO users_conf(id,password) VALUES (currval('users_id_seq'),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
 
 

Modified: trunk/sql/modules/admin.sql
===================================================================
--- trunk/sql/modules/admin.sql	2007-09-14 16:39:01 UTC (rev 1599)
+++ trunk/sql/modules/admin.sql	2007-09-14 18:36:53 UTC (rev 1600)
@@ -400,4 +400,6 @@
 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


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.