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

Removed unnecessary spaces at EOL.

Files:
1 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)