Sophie

Sophie

distrib > Fedora > 13 > i386 > media > os > by-pkgid > 68d77611c8ee677d3b007752626060ab > files > 23

phpTodo-0.8.1-0.10.beta.fc12.noarch.rpm

## phpTodo - Web based todo lists                                             ##
## Copyright (C) 2005-07  Jason Frisvold <friz@godshell.com>                  ##
##                                                                            ##
## This program is free software; you can redistribute it and/or modify       ##
## it under the terms of the GNU General Public License as published by       ##
## the Free Software Foundation; either version 2 of the License, or          ##
## (at your option) any later version.                                        ##
##                                                                            ##
## This program is distributed in the hope that it will be useful,            ##
## but WITHOUT ANY WARRANTY; without even the implied warranty of             ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              ##
## GNU General Public License for more details.                               ##
##                                                                            ##
## You should have received a copy of the GNU General Public License          ##
## along with this program; if not, write to the Free Software                ##
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA ##

## $Id: phpTodo-0.2-0.3-update.sql,v 1.5 2007/03/06 17:58:04 xen0phage Exp $ ##

# You *should* be able to pipe this through mysql to update your database
# mysql -uroot -p phpTodo < phpTodo-0.2-0.3-update.sql

# If you have altered the tables, this will probably fail.  As always, BACK UP YOUR DATA
# before you try this!

ALTER TABLE rss_feeds ADD (rss_version CHAR(8) NOT NULL DEFAULT '0.91',
                           category    INTEGER     UNSIGNED    NOT NULL DEFAULT 0,
                           FOREIGN KEY     (category)  REFERENCES category(id));


ALTER TABLE listentries ADD (category_id  INTEGER     UNSIGNED    NOT NULL DEFAULT 1,
                             FOREIGN KEY  (category_id) REFERENCES category(id));

CREATE TABLE category    (id              INTEGER     UNSIGNED    NOT NULL AUTO_INCREMENT,
                          category        CHAR(15)    NOT NULL,
                          user_id         INTEGER     UNSIGNED    NOT NULL,
                          PRIMARY KEY     (id),
                          INDEX           (user_id),
                          FOREIGN KEY     (user_id) REFERENCES users(id));

ALTER TABLE user_prefs ADD (category_filter INTEGER     UNSIGNED    NOT NULL DEFAULT 0,
                            FOREIGN KEY     (category_filter)  REFERENCES category(id));

INSERT INTO category VALUES (NULL, 'None', 0);
INSERT INTO category VALUES (NULL, 'Personal', 0);
INSERT INTO category VALUES (NULL, 'Work', 0);
INSERT INTO category VALUES (NULL, 'Other', 0);