summaryrefslogtreecommitdiff
path: root/debian/patches/0001-Don-t-create-a-database.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0001-Don-t-create-a-database.patch')
-rw-r--r--debian/patches/0001-Don-t-create-a-database.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/debian/patches/0001-Don-t-create-a-database.patch b/debian/patches/0001-Don-t-create-a-database.patch
new file mode 100644
index 0000000..b499376
--- /dev/null
+++ b/debian/patches/0001-Don-t-create-a-database.patch
@@ -0,0 +1,42 @@
+From: Michael Biebl <biebl@debian.org>
+Date: Thu, 13 Mar 2014 17:58:08 +0100
+Subject: Don't create a database
+
+dbconfig-common, which is used by rsyslog-mysql and rsyslog-pgsql, takes
+care of creating the database for us.
+---
+ plugins/ommysql/createDB.sql | 6 ++----
+ plugins/ompgsql/createDB.sql | 2 --
+ 2 files changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/plugins/ommysql/createDB.sql b/plugins/ommysql/createDB.sql
+index 211cfb0..1dc6f5c 100644
+--- a/plugins/ommysql/createDB.sql
++++ b/plugins/ommysql/createDB.sql
+@@ -1,6 +1,4 @@
+-CREATE DATABASE Syslog;
+-USE Syslog;
+-CREATE TABLE SystemEvents
++CREATE TABLE IF NOT EXISTS SystemEvents
+ (
+ ID int unsigned not null auto_increment primary key,
+ CustomerID bigint,
+@@ -28,7 +26,7 @@ CREATE TABLE SystemEvents
+ SystemID int NULL
+ );
+
+-CREATE TABLE SystemEventsProperties
++CREATE TABLE IF NOT EXISTS SystemEventsProperties
+ (
+ ID int unsigned not null auto_increment primary key,
+ SystemEventID int NULL ,
+diff --git a/plugins/ompgsql/createDB.sql b/plugins/ompgsql/createDB.sql
+index 0c0f7e1..5dab0dd 100644
+--- a/plugins/ompgsql/createDB.sql
++++ b/plugins/ompgsql/createDB.sql
+@@ -1,5 +1,3 @@
+-CREATE DATABASE "Syslog" WITH ENCODING 'SQL_ASCII' TEMPLATE template0;
+-\c Syslog;
+ CREATE TABLE SystemEvents
+ (
+ ID serial not null primary key,