summaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-16 19:41:31 +0400
committerAndrew Dolgov <[email protected]>2013-04-16 19:41:31 +0400
commit889a5f9f195309df5842f142986b3166212d8a58 (patch)
treeddefb4fe997bb9625856e56196e4b9e84592e742 /schema
parent4f032700dbfbbfa35798e05497c8a868eb73476f (diff)
experimental SQL-based error logger
Diffstat (limited to 'schema')
-rw-r--r--schema/ttrss_schema_mysql.sql13
-rw-r--r--schema/ttrss_schema_pgsql.sql13
-rw-r--r--schema/versions/mysql/118.sql16
-rw-r--r--schema/versions/pgsql/118.sql15
4 files changed, 55 insertions, 2 deletions
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index 3773d9a45..0d0a8f460 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -1,6 +1,7 @@
SET NAMES utf8;
SET CHARACTER SET utf8;
+drop table if exists ttrss_error_log;
drop table if exists ttrss_plugin_storage;
drop table if exists ttrss_linked_feeds;
drop table if exists ttrss_linked_instances;
@@ -299,7 +300,7 @@ create table ttrss_tags (id integer primary key auto_increment,
create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
-insert into ttrss_version values (117);
+insert into ttrss_version values (118);
create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null,
@@ -478,5 +479,15 @@ create table ttrss_plugin_storage (
content longtext not null,
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
+create table ttrss_error_log(
+ id integer not null auto_increment primary key,
+ owner_uid integer,
+ errno integer not null,
+ errstr text not null,
+ filename text not null,
+ lineno integer not null,
+ context text not null,
+ created_at datetime not null,
+ foreign key (owner_uid) references ttrss_users(id) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
commit;
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index 3fc58555d..d81f65f2b 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -1,3 +1,4 @@
+drop table if exists ttrss_error_log;
drop table if exists ttrss_plugin_storage;
drop table if exists ttrss_linked_feeds;
drop table if exists ttrss_linked_instances;
@@ -257,7 +258,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id);
create table ttrss_version (schema_version int not null);
-insert into ttrss_version values (117);
+insert into ttrss_version values (118);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
@@ -421,4 +422,14 @@ create table ttrss_plugin_storage (
owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
content text not null);
+create table ttrss_error_log(
+ id serial not null primary key,
+ owner_uid integer references ttrss_users(id) ON DELETE SET NULL,
+ errno integer not null,
+ errstr text not null,
+ filename text not null,
+ lineno integer not null,
+ context text not null,
+ created_at timestamp not null);
+
commit;
diff --git a/schema/versions/mysql/118.sql b/schema/versions/mysql/118.sql
new file mode 100644
index 000000000..add2b0c1f
--- /dev/null
+++ b/schema/versions/mysql/118.sql
@@ -0,0 +1,16 @@
+begin;
+
+create table ttrss_error_log(
+ id integer not null auto_increment primary key,
+ owner_uid integer,
+ errno integer not null,
+ errstr text not null,
+ filename text not null,
+ lineno integer not null,
+ context text not null,
+ created_at datetime not null,
+ foreign key (owner_uid) references ttrss_users(id) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
+
+update ttrss_version set schema_version = 118;
+
+commit;
diff --git a/schema/versions/pgsql/118.sql b/schema/versions/pgsql/118.sql
new file mode 100644
index 000000000..161cf4e3c
--- /dev/null
+++ b/schema/versions/pgsql/118.sql
@@ -0,0 +1,15 @@
+begin;
+
+create table ttrss_error_log(
+ id serial not null primary key,
+ owner_uid integer references ttrss_users(id) ON DELETE SET NULL,
+ errno integer not null,
+ errstr text not null,
+ filename text not null,
+ lineno integer not null,
+ context text not null,
+ created_at timestamp not null);
+
+update ttrss_version set schema_version = 118;
+
+commit;