]> git.donarmstrong.com Git - roundcube.git/commitdiff
Remove hack to update a SQLite table for an upgrade from a quite old
authorVincent Bernat <bernat@debian.org>
Sun, 15 Feb 2009 16:49:44 +0000 (16:49 +0000)
committerJérémy Bobbio <lunar@debian.org>
Sat, 18 Jun 2011 18:10:28 +0000 (20:10 +0200)
version of roundcube.

debian/changelog
debian/roundcube-core.postinst

index cdbe1a10e5156412012d11b8c01e4f2cbcd8b2ee..0460688740ccf082ff93beb830036c08462ad023 100644 (file)
@@ -11,6 +11,8 @@ roundcube (0.2~stable-1) unstable; urgency=low
       + Update patch to use packaged tinymce.
   * Upload to unstable since Lenny is out.
   * Apply fix for XSS issue (CVE-2009-0413). Closes: #514179.
+  * Remove hack to update a SQLite table for an upgrade from a quite old
+    version of roundcube.
   * Fix pending l10n issues:
       + Update English debconf template. Closes: #473794.
       + Add Swedish translation thanks to Martin Bagge. Closes: #508752.
index 5e7e0e223a9f7a71b1c76dd7387eb67fe79a61cf..5db3c4b328da05b4862d0fe4cf9f1edd4760b7da 100644 (file)
@@ -39,58 +39,6 @@ apache_install() {
 case "$1" in
     configure)
 
-       # From 0.1-beta2.2 to 0.1-rc1, a column was added to table
-       # `identities'. For MySQL and PostgreSQL, this is handled by
-       # dbconfig-common but for sqlite, there is no way to add a
-       # column to a table. Therefore, we dump here the table and add
-       # the column.
-       [ "$dbc_upgrade" = "true" ] && {
-           case "$dbc_dbtype" in
-               sqlite)
-                   db="${dbc_basepath}/${dbc_dbname}"
-               # OK, we need to check if the table contains html_signature
-                   if ! sqlite "$db" '.schema identities' | grep -q html_signature; then
-                       # We need to add it
-                       echo -n "Need to upgrade 'identities' table in $db... "
-                       upgrade_tmp=$(mktemp -t roundcube.sqlite.XXXXXXXXXX)
-                       (
-                           cat <<EOF
-BEGIN TRANSACTION;
-DROP TABLE identities;
-CREATE TABLE identities (
-  identity_id integer NOT NULL PRIMARY KEY,
-  user_id integer NOT NULL default '0',
-  del tinyint NOT NULL default '0',
-  standard tinyint NOT NULL default '0',
-  name varchar(128) NOT NULL default '',
-  organization varchar(128) default '',
-  email varchar(128) NOT NULL default '',
-  "reply-to" varchar(128) NOT NULL default '',
-  bcc varchar(128) NOT NULL default '',
-  signature text NOT NULL default '',
-  html_signature tinyint NOT NULL default '0'
-);
-
-CREATE INDEX ix_identities_user_id ON identities(user_id);
-
-EOF
-                           # We dump and keep only inserts
-                           sqlite "$db" '.dump identities' | \
-                               awk '/^INSERT INTO/ {start = 1} {if (start == 1) print}' | \
-                               head -n -2 | \
-                               sed 's/^\(INSERT INTO identities \)/\1(identity_id, user_id, del, standard, name, organization, email, "reply-to", bcc, signature) /'
-                           echo 'COMMIT;' ) > $upgrade_tmp
-                       sqlite "$db" < $upgrade_tmp
-                       rm $upgrade_tmp
-                       echo "OK"
-                   fi
-                   ;;
-               *)
-                   # Do nothing
-                   ;;
-           esac
-       }
-
        CONFFILE=/etc/roundcube/main.inc.php
        touch $CONFFILE.ucftmp
        chmod 640 $CONFFILE.ucftmp