summaryrefslogtreecommitdiff
path: root/debian/sqliteconv1.sh
diff options
context:
space:
mode:
Diffstat (limited to 'debian/sqliteconv1.sh')
-rwxr-xr-xdebian/sqliteconv1.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/sqliteconv1.sh b/debian/sqliteconv1.sh
new file mode 100755
index 0000000..f954f92
--- /dev/null
+++ b/debian/sqliteconv1.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+cat $1 | \
+ grep -v ^# | \
+ grep -v ' KEY "' | \
+ grep -v ' UNIQUE KEY "' | \
+ sed -e "s/\`/\'/g" -e "s/UNIX_TIMESTAMP()/strftime('%s','now')/" | \
+ sed 's/ unsigned / /g' | \
+ sed 's/ auto_increment/ /gi' | \
+ sed 's/ smallint([0-9]*) / integer /gi' | \
+ sed 's/ mediumint([0-9]*) / integer /gi' | \
+ sed 's/ tinyint([0-9]*) / integer /gi' | \
+ sed 's/ int([0-9]*) / integer /gi' | \
+ sed 's/ character set [^ ]* / /gi' | \
+ sed 's/ collate [^ ]* / /gi' | \
+ sed 's/ enum([^)]*) / varchar(255) /gi' | \
+ sed 's/ on update [^,]*//gi'