Show
Ignore:
Timestamp:
09/27/08 22:02:37 (16 years ago)
Author:
jerome
Message:

Removed unnecessary spaces at EOL.

Location:
pykota/trunk/initscripts/mysql
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/initscripts/mysql/pykota-mysql.sql

    r3279 r3413  
    77-- the Free Software Foundation, either version 3 of the License, or 
    88-- (at your option) any later version. 
    9 --  
     9-- 
    1010-- This program is distributed in the hope that it will be useful, 
    1111-- but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1212-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1313-- GNU General Public License for more details. 
    14 --  
     14-- 
    1515-- You should have received a copy of the GNU General Public License 
    1616-- along with this program.  If not, see <http://www.gnu.org/licenses/>. 
     
    3535-- Create the print quota database users 
    3636-- NOTE: Change the "IDENTIFIED BY" strings to the passwords you would like. 
    37 --  
     37-- 
    3838GRANT USAGE ON *.* TO 'pykotauser'@'localhost' IDENTIFIED BY 'readonlypw'; 
    3939GRANT USAGE ON *.* TO 'pykotaadmin'@'localhost' IDENTIFIED BY 'readwritepw'; 
    4040 
    41 --  
     41-- 
    4242-- If necessary activate the lines below (and keep the preceding ones 
    4343-- activated at the same time) 
     
    4646-- GRANT USAGE ON *.* TO 'pykotaadmin'@'%' IDENTIFIED BY 'readwritepw'; 
    4747 
    48 --  
     48-- 
    4949-- Now connect to the new database 
    50 --  
     50-- 
    5151USE pykota; 
    5252 
     
    5656CREATE TABLE users (id INT4 PRIMARY KEY NOT NULL AUTO_INCREMENT, 
    5757                   username VARCHAR(255) UNIQUE NOT NULL, 
    58                    email TEXT,  
     58                   email TEXT, 
    5959                   balance FLOAT DEFAULT 0.0, 
    6060                   lifetimepaid FLOAT DEFAULT 0.0, 
     
    6262                   description TEXT, 
    6363                   overcharge FLOAT NOT NULL DEFAULT 1.0) TYPE=INNODB; 
    64                     
     64 
    6565-- 
    6666-- Create the groups table 
     
    7070                    description TEXT, 
    7171                    limitby VARCHAR(30) DEFAULT 'quota') TYPE=INNODB; 
    72                      
     72 
    7373-- 
    7474-- Create the printers table 
     
    8181                      passthrough ENUM('t','f') DEFAULT 'f', 
    8282                      maxjobsize INT4) TYPE=INNODB; 
    83                      
     83 
    8484-- 
    8585-- Create the print quota table for users 
    8686-- 
    8787CREATE TABLE userpquota (id INT8 PRIMARY KEY NOT NULL AUTO_INCREMENT, 
    88                         userid INT4,  
    89                         printerid INT4,  
     88                        userid INT4, 
     89                        printerid INT4, 
    9090                        lifepagecounter INT4 DEFAULT 0, 
    9191                        pagecounter INT4 DEFAULT 0, 
     
    9494                        datelimit DATETIME, 
    9595                        maxjobsize INT4, 
    96                         warncount INT4 DEFAULT 0,  
     96                        warncount INT4 DEFAULT 0, 
    9797                        INDEX (userid), 
    9898                        FOREIGN KEY (userid) REFERENCES users(id), 
    9999                        INDEX (printerid), 
    100                         FOREIGN KEY (printerid) REFERENCES printers(id))  
     100                        FOREIGN KEY (printerid) REFERENCES printers(id)) 
    101101                        TYPE=INNODB; 
    102102CREATE UNIQUE INDEX userpquota_up_id_ix ON userpquota (userid, printerid); 
    103                          
     103 
    104104-- 
    105105-- Create the job history table 
     
    132132CREATE INDEX jobhistory_pd_id_ix ON jobhistory (printerid, jobdate); 
    133133CREATE INDEX jobhistory_hostname_ix ON jobhistory (hostname); 
    134                          
     134 
    135135-- 
    136136-- Create the print quota table for groups 
    137137-- 
    138138CREATE TABLE grouppquota(id INT8 PRIMARY KEY NOT NULL AUTO_INCREMENT, 
    139                          groupid INT4,  
     139                         groupid INT4, 
    140140                         printerid INT4, 
    141141                         softlimit INT4, 
     
    149149                         TYPE=INNODB; 
    150150CREATE UNIQUE INDEX grouppquota_up_id_ix ON grouppquota (groupid, printerid); 
    151                          
    152 --                          
     151 
     152-- 
    153153-- Create the groups/members relationship 
    154154-- 
     
    160160                           FOREIGN KEY (userid) REFERENCES users(id), 
    161161                           PRIMARY KEY (groupid, userid)) TYPE=INNODB; 
    162                             
    163 --                          
     162 
     163-- 
    164164-- Create the printer groups relationship 
    165165-- 
     
    173173-- 
    174174-- Create the table for payments 
    175 --  
     175-- 
    176176CREATE TABLE payments (id INT4 PRIMARY KEY NOT NULL AUTO_INCREMENT, 
    177177                       userid INT4, 
     
    195195                           ) TYPE=INNODB; 
    196196 
    197 --  
     197-- 
    198198-- Create the table for the billing codes 
    199199-- 
     
    203203                           balance FLOAT DEFAULT 0.0, 
    204204                           pagecounter INT4 DEFAULT 0) TYPE=INNODB; 
    205 --                         
    206 -- Set some ACLs                         
     205-- 
     206-- Set some ACLs 
    207207-- 
    208208GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON `pykota`.* TO 'pykotaadmin'@'localhost'; 
    209209GRANT SELECT ON `pykota`.* TO 'pykotauser'@'localhost'; 
    210210 
    211 --  
     211-- 
    212212-- If necessary activate the lines below (and keep the preceding ones 
    213213-- activated at the same time) 
  • pykota/trunk/initscripts/mysql/README.mysql

    r3279 r3413  
    2525DataBase using MySQL as a backend. 
    2626 
    27         - edit the pykota-mysql.sql file and modify the passwords at  
     27        - edit the pykota-mysql.sql file and modify the passwords at 
    2828          the end of the 'GRANT USAGE' lines. 
    29            
     29 
    3030        - As MySQL's administrative user, usually root, 
    3131          do the following : 
    32            
     32 
    3333            # mysql <pykota-mysql.sql 
    34              
     34 
    3535        - If no error message appear, your MySQL PyKota storage 
    3636          is now ready for use. 
    37            
     37 
    3838        - In ~pykota/pykota.conf, ensure that the following lines 
    3939          are present and unique inside the [global] section : 
    40          
     40 
    4141            storagebackend : mysqlstorage 
    4242            storageserver : localhost 
     
    4444            storageuser : pykotauser 
    4545            storageuserpw : readonlypw 
    46              
     46 
    4747            NB : replace 'readonlypw' with the password you chose 
    4848            for user 'pykotauser' when you modified pykota-mysql.sql 
    49              
     49 
    5050        - In ~pykota/pykotadmin.conf ensure that the following lines 
    5151          are present and unique inside the [global] section : 
    52          
     52 
    5353            storageadmin : pykotaadmin 
    5454            storageadminpw : readwritepw 
    55              
     55 
    5656            NB : replace 'readwritepw' with the password you chose 
    5757            for user 'pykotaadmin' when you modified pykota-mysql.sql 
    58              
    59         - IMPORTANT : if your database is not located on the print server,  
    60           replace 'localhost' in the lines above with your database server's  
     58 
     59        - IMPORTANT : if your database is not located on the print server, 
     60          replace 'localhost' in the lines above with your database server's 
    6161          hostname or IP address. If your database server doesn't listen on 
    6262          its standard port, add the port number at the end of the hostname 
    6363          with a colon to separate the hostname from the port. 
    6464          See pykota/conf/pykota.conf.sample for examples. 
    65          
     65 
    6666============================================================