summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-12-27 18:53:08 +0100
committerlouiz’ <louiz@louiz.org>2017-12-27 18:53:08 +0100
commite4122880b5a9208aa97807ea517f70375a824a1e (patch)
tree5cce1069821e7bf5ca23049823521f8882c03d81 /scripts
parentbb2dd2b69306517c85bfe59dee323cf94ef34292 (diff)
downloadbiboumi-e4122880b5a9208aa97807ea517f70375a824a1e.tar.gz
biboumi-e4122880b5a9208aa97807ea517f70375a824a1e.tar.bz2
biboumi-e4122880b5a9208aa97807ea517f70375a824a1e.tar.xz
biboumi-e4122880b5a9208aa97807ea517f70375a824a1e.zip
Add a documentation to explain how to migrate from sqlite3 to postgresl
fix #3319
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dump_sqlite3.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/dump_sqlite3.sh b/scripts/dump_sqlite3.sh
new file mode 100755
index 0000000..88f3097
--- /dev/null
+++ b/scripts/dump_sqlite3.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+sqlite3_args=$@
+
+function dump_table {
+ table=$1
+ columns=$2
+ echo ".mode insert $table
+.output $table.sql
+select $columns from $table;" | sqlite3 $sqlite3_args
+}
+
+dump_table "roster" "local, remote"
+
+dump_table "ircserveroptions_" "id_, owner_, server_, pass_, afterconnectioncommand_, tlsports_, ports_, username_, realname_, verifycert_, trustedfingerprint_, encodingout_, encodingin_, maxhistorylength_"
+
+dump_table "ircchanneloptions_" "id_, owner_, server_, channel_, encodingout_, encodingin_, maxhistorylength_, persistent_, recordhistory_"
+
+dump_table "globaloptions_" "id_, owner_, maxhistorylength_, recordhistory_, persistent_"
+
+dump_table "muclogline_" "id_, uuid_, owner_, ircchanname_, ircservername_, date_, body_, nick_"