aboutsummaryrefslogtreecommitdiff
path: root/firebase-migration.sh
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-05-22 20:59:49 +0200
committertomsmeding <tom.smeding@gmail.com>2017-05-22 20:59:49 +0200
commitdabeb3a9fe2295e9b95a46e72de6e78e78f1befb (patch)
treebfb2ae709c746fb9fd6a807200be27b0e003bc6e /firebase-migration.sh
parent9500daf44d23689d83d480acebdd20f9fc78acdd (diff)
server: WIP firebase
Diffstat (limited to 'firebase-migration.sh')
-rwxr-xr-xfirebase-migration.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/firebase-migration.sh b/firebase-migration.sh
new file mode 100755
index 0000000..ad2f121
--- /dev/null
+++ b/firebase-migration.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+dbname="$1"
+if test $# -ne 1 -o -n "$1"; then
+ echo >&2 "Pass database file as command-line argument"
+ exit 1
+fi
+
+sqlite3 "$dbname" <<EOF
+create table Firebase (
+ user integer,
+ token text
+);
+create index firebase_user_index on Firebase(user);
+EOF