]> git.donarmstrong.com Git - infobot.git/blobdiff - INSTALL.pgsql
update Debian.pl for etch release
[infobot.git] / INSTALL.pgsql
index 951040085acdba683bb930f486ab49f174c195a0..ecab8bcc0c769cfee90fb88e15e4ccafeff5610f 100644 (file)
@@ -2,36 +2,38 @@ Method of installation.
 -----------------------
 
 - Debian: (apt-get install postgresql)
-- Debian: (apt-get install libpgperl)
+- Debian: (apt-get install libpg-perl)
 
----
-OLD: SUPPORT FOR PGSQL IS CURRENTLY BROKEN! You'll have to use one of the other
-databases instead.
----
 
-Actually, I have implemented pgsql support. It works just fine, but it assumes
-that you have precreated the tables for now. To help with this, I have
-included a sql file under setup/pgsql/pgsql-schema.sql. Simply psql <dbname>
-and the type:
+As of now, blootbot has full pgsql support. It seems to be working 100%, but it
+assumes that you have precreated the database and user for now. As long as you
+already created the database and user and stored this info in the blootbot.config,
+then the tables will automatically be created on startup. Until I get setup.pl
+fixed, run the following commands as root (or postgres if root doesnt have
+permission to create users/db's):
 
-dbname#=> BEGIN;
-dbname#=> \i path/to/setup/pgsql/pgsql-schema.sql
-.......
-dbname#=> COMMIT;
+> createuser --no-adduser --no-createdb --pwprompt --encrypted <user>
+> createdb --owner=<user> <dbname> [<description>]
 
-If everything went fine, you should have working Pgsql tables needed for blootbot.
-Type "\d" to check if they were created.
+Dont forget to replace <user> and so forth with actual values you intend to use,
+and dont include the <>'s ;) If you run these commands, you should get a user
+with an encrypted password that cannot create new db's or user's (as it should be!),
+and the user will own the newly created database <dbname>. Congrats!
 
-In the future I will try to get things working a little smoother. But for now
-this should be considered "near production" quality. :)
+If everything went fine, you should have everything blootbot needs to use pgsql.
+Next simply cd to the base directory you installed the bot to and type:
 
-TODO: 
------
-  - Auto create tables if they dont exist
-  - Modify setup.pl to do pgsql work
-  - Pgsql db conversions?
+./blootbot
 
 
+Thats it! Everything the bot needs should be automatically created when it loads
+for the first time.
+
+In the future I will try to get around to editing the setup.pl file to ask the
+same questions it does for mysql (your root password etc) so that you can skip
+manually creating the database/user. But for now, this should be just fine for
+most of you techies out there.
+
 
 ----
 troubled@freenode