From a8c22829d8e8845cd4ddf4ef8b61a1ed79edfffc Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 12 Mar 2018 22:57:42 +0100 Subject: Imported from the SVN repository http://svn.wolffelaar.nl/wsvn/phpbb/branches/jessie/ Signed-off-by: Olivier Gayot --- debian/sqliteconv1.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 debian/sqliteconv1.sh (limited to 'debian/sqliteconv1.sh') 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' -- cgit v1.2.3