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

Removed unnecessary spaces at EOL.

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

Legend:

Unmodified
Added
Removed
  • pykota/trunk/initscripts/sqlite/pykota-sqlite.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/>. 
     
    3232CREATE TABLE users(id INTEGER PRIMARY KEY NOT NULL, 
    3333                   username TEXT UNIQUE NOT NULL, 
    34                    email TEXT,  
     34                   email TEXT, 
    3535                   balance FLOAT DEFAULT 0.0, 
    3636                   lifetimepaid FLOAT DEFAULT 0.0, 
     
    3838                   description TEXT, 
    3939                   overcharge FLOAT NOT NULL DEFAULT 1.0); 
    40                     
     40 
    4141-- 
    4242-- Create the groups table 
     
    4646                    description TEXT, 
    4747                    limitby TEXT DEFAULT 'quota'); 
    48                      
     48 
    4949-- 
    5050-- Create the printers table 
     
    5757                      passthrough BOOLEAN DEFAULT FALSE, 
    5858                      maxjobsize INT4); 
    59                      
     59 
    6060-- 
    6161-- Create the print quota table for users 
     
    7070                        datelimit TEXT, 
    7171                        maxjobsize INT4, 
    72                         warncount INT4 DEFAULT 0);  
     72                        warncount INT4 DEFAULT 0); 
    7373CREATE INDEX userpquota_u_id_ix ON userpquota (userid); 
    7474CREATE INDEX userpquota_p_id_ix ON userpquota (printerid); 
    7575CREATE UNIQUE INDEX userpquota_up_id_ix ON userpquota (userid, printerid); 
    76                          
     76 
    7777-- 
    7878-- Create the job history table 
     
    103103CREATE INDEX jobhistory_pd_id_ix ON jobhistory (printerid, jobdate); 
    104104CREATE INDEX jobhistory_hostname_ix ON jobhistory (hostname); 
    105                          
     105 
    106106-- 
    107107-- Create the print quota table for groups 
     
    117117CREATE INDEX grouppquota_p_id_ix ON grouppquota (printerid); 
    118118CREATE UNIQUE INDEX grouppquota_up_id_ix ON grouppquota (groupid, printerid); 
    119                          
    120 --                          
     119 
     120-- 
    121121-- Create the groups/members relationship 
    122122-- 
     
    124124                           userid INT4 REFERENCES users(id), 
    125125                           PRIMARY KEY (groupid, userid)); 
    126                             
    127 --                          
     126 
     127-- 
    128128-- Create the printer groups relationship 
    129129-- 
     
    133133-- 
    134134-- Create the table for payments 
    135 --  
     135-- 
    136136CREATE TABLE payments (id INTEGER PRIMARY KEY NOT NULL, 
    137137                       userid INT4 REFERENCES users(id), 
     
    141141CREATE INDEX payments_date_ix ON payments (date); 
    142142 
    143 --  
     143-- 
    144144-- Create the table for coefficients wrt paper sizes and the like 
    145145-- 
    146 CREATE TABLE coefficients (id INTEGER PRIMARY KEY NOT NULL,  
    147                            printerid INTEGER NOT NULL REFERENCES printers(id),  
    148                            label TEXT NOT NULL,  
    149                            coefficient FLOAT DEFAULT 1.0,  
     146CREATE TABLE coefficients (id INTEGER PRIMARY KEY NOT NULL, 
     147                           printerid INTEGER NOT NULL REFERENCES printers(id), 
     148                           label TEXT NOT NULL, 
     149                           coefficient FLOAT DEFAULT 1.0, 
    150150                           CONSTRAINT coeffconstraint UNIQUE (printerid, label)); 
    151151 
    152 --  
     152-- 
    153153-- Create the table for the billing codes 
    154154-- 
  • pykota/trunk/initscripts/sqlite/README.sqlite

    r3279 r3413  
    2727    for use with PyKota, in the case you don't want to use 
    2828    either PostgreSQL, MySQL, or LDAP : 
    29      
     29 
    3030    NB : an SQLite3 database can't be shared between several 
    3131    PyKota managed print servers, contrarily to the other 
    3232    database backends. 
    33      
     33 
    3434    HowTo : 
    35      
     35 
    3636      - Install SQLite v3.2.1 or higher, and its development files, 
    3737        for example on my Debian box : 
    38          
     38 
    3939                # apt-get install sqlite3 libsqlite3-dev 
    40                  
    41         You can also download SQLite from http://www.sqlite.org         
     40 
     41        You can also download SQLite from http://www.sqlite.org 
    4242 
    4343      - Download and install PySQLite v2.0.5 or higher from : 
    44        
     44 
    4545                http://www.pysqlite.org 
    4646 
     
    5050                # cd pysqlite-2.0.5 
    5151                # python setup.py install 
    52                  
     52 
    5353        Under Debian, if the package exists for your version of Debian, 
    5454        simply do : 
    55          
     55 
    5656                # apt-get install python-pysqlite2 
    57                  
     57 
    5858      - Create an SQLite3 database for PyKota : 
    5959 
     
    6262                # chmod 660 ~pykota/pykota.db 
    6363                # chown pykota.pykota ~pykota       (seems to be necessary) 
    64                  
     64 
    6565        NB : adapt the permissions so that the user your printing 
    6666             system runs as (e.g. user 'lp') can read and write 
    6767             to the /etc/pykota/pykota.db file. 
    68                  
     68 
    6969      - In ~pykota/pykotadmin.conf, just comment out all the lines 
    7070 
     
    7474                storagebackend : sqlitestorage 
    7575                storagename : /etc/pykota/pykota.db 
    76                  
     76 
    7777        And comment out all other directives which name begins with 'storage'. 
    7878        NB : feel free to use a different path to store pykota.db, and 
    7979             adapt your configuration files and permissions accordingly. 
    80                  
    81 Your PyKota setup is now ready to be used with an SQLite3 database.              
     80 
     81Your PyKota setup is now ready to be used with an SQLite3 database. 
    8282 
    8383IMPORTANT : with PyKota's SQLite backend there's no possibility to separate