mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-21 03:02:09 +00:00
roundcube: upgrade carddav plugin to 3.0.3 & updated migrate.py
This commit is contained in:
parent
16f38042ec
commit
a7023d3758
@ -148,6 +148,29 @@ def migration_11(env):
|
|||||||
# meh
|
# meh
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def migration_12(env):
|
||||||
|
# Upgrading from Carddav Roundcube plugin to version 3+ requires the carddav_
|
||||||
|
# tables to be dropped
|
||||||
|
import sqlite3
|
||||||
|
conn = sqlite3.connect(os.path.join(env["STORAGE_ROOT"], "mail/roundcube/roundcube.sqlite"))
|
||||||
|
c = conn.cursor()
|
||||||
|
# Get a list of all the tables that begin with 'carddav_'
|
||||||
|
c.execute("SELECT name FROM sqlite_master WHERE type = ? AND name LIKE ?", ('table', 'carddav_%'))
|
||||||
|
carddav_tables = c.fetchall()
|
||||||
|
# If there were tables that begin with 'carddav_', drop them
|
||||||
|
if carddav_tables:
|
||||||
|
for table in carddav_tables:
|
||||||
|
try:
|
||||||
|
table = table[0]
|
||||||
|
c = conn.cursor()
|
||||||
|
dropcmd = "DROP TABLE %s" % table
|
||||||
|
c.execute(dropcmd)
|
||||||
|
except:
|
||||||
|
print("Failed to drop table", table, e)
|
||||||
|
# Save.
|
||||||
|
conn.commit()
|
||||||
|
conn.close()
|
||||||
|
|
||||||
def get_current_migration():
|
def get_current_migration():
|
||||||
ver = 0
|
ver = 0
|
||||||
while True:
|
while True:
|
||||||
|
@ -39,8 +39,8 @@ VERSION=1.3.7
|
|||||||
HASH=df0e29d09aae0b7a7ae98023dcd1ae3c6be77cd0
|
HASH=df0e29d09aae0b7a7ae98023dcd1ae3c6be77cd0
|
||||||
PERSISTENT_LOGIN_VERSION=dc5ca3d3f4415cc41edb2fde533c8a8628a94c76
|
PERSISTENT_LOGIN_VERSION=dc5ca3d3f4415cc41edb2fde533c8a8628a94c76
|
||||||
HTML5_NOTIFIER_VERSION=4b370e3cd60dabd2f428a26f45b677ad1b7118d5
|
HTML5_NOTIFIER_VERSION=4b370e3cd60dabd2f428a26f45b677ad1b7118d5
|
||||||
CARDDAV_VERSION=2.0.4
|
CARDDAV_VERSION=3.0.3
|
||||||
CARDDAV_HASH=d93f3cfb3038a519e71c7c3212c1d16f5da609a4
|
CARDDAV_HASH=d1e3b0d851ffa2c6bd42bf0c04f70d0e1d0d78f8
|
||||||
|
|
||||||
UPDATE_KEY=$VERSION:$PERSISTENT_LOGIN_VERSION:$HTML5_NOTIFIER_VERSION:$CARDDAV_VERSION
|
UPDATE_KEY=$VERSION:$PERSISTENT_LOGIN_VERSION:$HTML5_NOTIFIER_VERSION:$CARDDAV_VERSION
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user