librefm-commits
[Top][All Lists]
Advanced

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

[Librefm-commits] [1570] create the missing $adodb_connect_string, and


From: David Mignot
Subject: [Librefm-commits] [1570] create the missing $adodb_connect_string, and add a unique constraint to 'username' in Users table
Date: Thu, 14 May 2009 17:02:25 +0000

Revision: 1570
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1570
Author:   idflood
Date:     2009-05-14 17:02:24 +0000 (Thu, 14 May 2009)
Log Message:
-----------
create the missing $adodb_connect_string, and add a unique constraint to 
'username' in Users table

Modified Paths:
--------------
    trunk/gnukebox/install.php

Modified: trunk/gnukebox/install.php
===================================================================
--- trunk/gnukebox/install.php  2009-05-14 15:56:29 UTC (rev 1569)
+++ trunk/gnukebox/install.php  2009-05-14 17:02:24 UTC (rev 1570)
@@ -38,6 +38,8 @@
        } else {
                $connect_string = $dbms . "://" . $_POST['username'] . ":" . 
$_POST['password'] . "@" . $_POST['hostname'] . ":" . $_POST['port'] . "/" . 
$_POST['dbname'];
        }
+       
+       $adodb_connect_string = str_replace('pgsql:', 'postgres:', 
$connect_string );
 
        try {
                $adodb =& NewADOConnection($adodb_connect_string);
@@ -62,7 +64,7 @@
 
        $adodb->Execute("CREATE TABLE Users (
                uniqueid SERIAL PRIMARY KEY,
-               username VARCHAR(64),
+               username VARCHAR(64) unique,
                password VARCHAR(32) NOT NULL,
                email VARCHAR(255),
                fullname VARCHAR(255),





reply via email to

[Prev in Thread] Current Thread [Next in Thread]