summaryrefslogtreecommitdiff
path: root/debian/sqliteconv1.sh
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2018-03-12 22:57:42 +0100
committerOlivier Gayot <duskcoder@gmail.com>2018-03-12 22:57:42 +0100
commita8c22829d8e8845cd4ddf4ef8b61a1ed79edfffc (patch)
treef0ae554b863266fbe523582d1be09216436c7472 /debian/sqliteconv1.sh
Imported from the SVN repository
http://svn.wolffelaar.nl/wsvn/phpbb/branches/jessie/ Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
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'