diff --git a/distribution/src/database/openfire_db2.sql b/distribution/src/database/openfire_db2.sql index 3a686b521a..c945f0426c 100644 --- a/distribution/src/database/openfire_db2.sql +++ b/distribution/src/database/openfire_db2.sql @@ -395,6 +395,16 @@ CREATE TABLE ofPubsubDefaultConf ( CONSTRAINT ofPubsubDefConf_pk PRIMARY KEY (serviceID, leaf) ); +CREATE TABLE ofSpamReport ( + reporter VARCHAR(1024) NOT NULL, + reported VARCHAR(1024) NOT NULL, + reason VARCHAR(255) NOT NULL, + created BIGINT NOT NULL, + raw LONG VARCHAR NOT NULL +); +CREATE INDEX ofSpamReport_created_reporter_id ON ofSpamReport (created, reporter); +CREATE INDEX ofSpamReport_created_reported_id ON ofSpamReport (created, reported); + -- Finally, insert default table values INSERT INTO ofID (idType, id) VALUES (18, 1); INSERT INTO ofID (idType, id) VALUES (19, 1); @@ -402,7 +412,7 @@ INSERT INTO ofID (idType, id) VALUES (23, 1); INSERT INTO ofID (idType, id) VALUES (26, 2); INSERT INTO ofID (idType, id) VALUES (27, 1); -INSERT INTO ofVersion (name, version) VALUES ('openfire', 36); +INSERT INTO ofVersion (name, version) VALUES ('openfire', 376); -- Entry for admin user INSERT INTO ofUser (username, plainPassword, name, email, creationDate, modificationDate) diff --git a/distribution/src/database/openfire_hsqldb.sql b/distribution/src/database/openfire_hsqldb.sql index d1bcf29c34..31c5e4928b 100644 --- a/distribution/src/database/openfire_hsqldb.sql +++ b/distribution/src/database/openfire_hsqldb.sql @@ -382,11 +382,11 @@ CREATE TABLE ofPubsubDefaultConf ( ); CREATE TABLE ofSpamReport ( - reporter VARCHAR(1024) NOT NULL, - reported VARCHAR(1024) NOT NULL, - reason VARCHAR(255) NOT NULL, - created BIGINT NOT NULL, - raw LONGVARCHAR NOT NULL + reporter VARCHAR(1024) NOT NULL, + reported VARCHAR(1024) NOT NULL, + reason VARCHAR(255) NOT NULL, + created BIGINT NOT NULL, + raw LONGVARCHAR NOT NULL ); CREATE INDEX ofSpamReport_created_reporter_id ON ofSpamReport (created, reporter); CREATE INDEX ofSpamReport_created_reported_id ON ofSpamReport (created, reported); diff --git a/distribution/src/database/openfire_mysql.sql b/distribution/src/database/openfire_mysql.sql index 07e9f26f13..0ed414ba8d 100644 --- a/distribution/src/database/openfire_mysql.sql +++ b/distribution/src/database/openfire_mysql.sql @@ -371,6 +371,16 @@ CREATE TABLE ofPubsubDefaultConf ( PRIMARY KEY (serviceID, leaf) ); +CREATE TABLE ofSpamReport ( + reporter VARCHAR(1024) NOT NULL, + reported VARCHAR(1024) NOT NULL, + reason VARCHAR(255) NOT NULL, + created BIGINT NOT NULL, + raw TEXT NOT NULL, + INDEX ofSpamReport_created_reporter_id (created, reporter), + INDEX ofSpamReport_created_reported_id (created, reported) +); + # Finally, insert default table values. INSERT INTO ofID (idType, id) VALUES (18, 1); @@ -379,7 +389,7 @@ INSERT INTO ofID (idType, id) VALUES (23, 1); INSERT INTO ofID (idType, id) VALUES (26, 2); INSERT INTO ofID (idType, id) VALUES (27, 1); -INSERT INTO ofVersion (name, version) VALUES ('openfire', 36); +INSERT INTO ofVersion (name, version) VALUES ('openfire', 37); # Entry for admin user INSERT INTO ofUser (username, plainPassword, name, email, creationDate, modificationDate) diff --git a/distribution/src/database/openfire_oracle.sql b/distribution/src/database/openfire_oracle.sql index 61863ffb4a..f07b13530d 100644 --- a/distribution/src/database/openfire_oracle.sql +++ b/distribution/src/database/openfire_oracle.sql @@ -379,6 +379,16 @@ CREATE TABLE ofPubsubDefaultConf ( CONSTRAINT ofPubsubDefaultConf_pk PRIMARY KEY (serviceID, leaf) ); +CREATE TABLE ofSpamReport ( + reporter VARCHAR2(1024) NOT NULL, + reported VARCHAR2(1024) NOT NULL, + reason VARCHAR2(255) NOT NULL, + created INTEGER NOT NULL, + "raw" CLOB NOT NULL +); +CREATE INDEX ofSpamReport_created_reporter_id ON ofSpamReport (created, reporter); +CREATE INDEX ofSpamReport_created_reported_id ON ofSpamReport (created, reported); + -- Finally, insert default table values. INSERT INTO ofID (idType, id) VALUES (18, 1); @@ -387,7 +397,7 @@ INSERT INTO ofID (idType, id) VALUES (23, 1); INSERT INTO ofID (idType, id) VALUES (26, 2); INSERT INTO ofID (idType, id) VALUES (27, 1); -INSERT INTO ofVersion (name, version) VALUES ('openfire', 36); +INSERT INTO ofVersion (name, version) VALUES ('openfire', 37); -- Entry for admin user INSERT INTO ofUser (username, plainPassword, name, email, creationDate, modificationDate) diff --git a/distribution/src/database/openfire_postgresql.sql b/distribution/src/database/openfire_postgresql.sql index 130eddf2f7..bb6a59e832 100644 --- a/distribution/src/database/openfire_postgresql.sql +++ b/distribution/src/database/openfire_postgresql.sql @@ -387,6 +387,16 @@ CREATE TABLE ofPubsubDefaultConf ( CONSTRAINT ofPubsubDefaultConf_pk PRIMARY KEY (serviceID, leaf) ); +CREATE TABLE ofSpamReport ( + reporter VARCHAR(1024) NOT NULL, + reported VARCHAR(1024) NOT NULL, + reason VARCHAR(255) NOT NULL, + created BIGINT NOT NULL, + raw TEXT NOT NULL +); +CREATE INDEX ofSpamReport_created_reporter_id ON ofSpamReport (created, reporter); +CREATE INDEX ofSpamReport_created_reported_id ON ofSpamReport (created, reported); + -- Finally, insert default table values. INSERT INTO ofID (idType, id) VALUES (18, 1); @@ -395,7 +405,7 @@ INSERT INTO ofID (idType, id) VALUES (23, 1); INSERT INTO ofID (idType, id) VALUES (26, 2); INSERT INTO ofID (idType, id) VALUES (27, 1); -INSERT INTO ofVersion (name, version) VALUES ('openfire', 36); +INSERT INTO ofVersion (name, version) VALUES ('openfire', 37); -- Entry for admin user INSERT INTO ofUser (username, plainPassword, name, email, creationDate, modificationDate) diff --git a/distribution/src/database/openfire_sqlserver.sql b/distribution/src/database/openfire_sqlserver.sql index 663c5ee71f..141ef6b7a6 100644 --- a/distribution/src/database/openfire_sqlserver.sql +++ b/distribution/src/database/openfire_sqlserver.sql @@ -384,6 +384,16 @@ CREATE TABLE ofPubsubDefaultConf ( CONSTRAINT ofPubsubDefaultConf_pk PRIMARY KEY (serviceID, leaf) ); +CREATE TABLE ofSpamReport ( + reporter VARCHAR(1024) NOT NULL, + reported VARCHAR(1024) NOT NULL, + reason VARCHAR(255) NOT NULL, + created BIGINT NOT NULL, + raw NVARCHAR(MAX) NOT NULL +); +CREATE INDEX ofSpamReport_created_reporter_id ON ofSpamReport (created, reporter); +CREATE INDEX ofSpamReport_created_reported_id ON ofSpamReport (created, reported); + /* Finally, insert default table values. */ INSERT INTO ofID (idType, id) VALUES (18, 1); diff --git a/distribution/src/database/openfire_sybase.sql b/distribution/src/database/openfire_sybase.sql index bb4cb4de09..25935e8927 100644 --- a/distribution/src/database/openfire_sybase.sql +++ b/distribution/src/database/openfire_sybase.sql @@ -384,6 +384,16 @@ CREATE TABLE ofPubsubDefaultConf ( CONSTRAINT ofPubsubDefaultConf_pk PRIMARY KEY (serviceID, leaf) ) +CREATE TABLE ofSpamReport ( + reporter NVARCHAR(1024) NOT NULL, + reported NVARCHAR(1024) NOT NULL, + reason NVARCHAR(255) NOT NULL, + created INTEGER NOT NULL, + "raw" LONG VARCHAR NOT NULL +) +CREATE INDEX ofSpamReport_created_reporter_id ON ofSpamReport (created, reporter) +CREATE INDEX ofSpamReport_created_reported_id ON ofSpamReport (created, reported) + /* Finally, insert default table values. */ INSERT INTO ofID (idType, id) VALUES (18, 1) diff --git a/distribution/src/database/upgrade/37/openfire_db2.sql b/distribution/src/database/upgrade/37/openfire_db2.sql new file mode 100644 index 0000000000..b981d53e56 --- /dev/null +++ b/distribution/src/database/upgrade/37/openfire_db2.sql @@ -0,0 +1,11 @@ +CREATE TABLE ofSpamReport ( + reporter VARCHAR(1024) NOT NULL, + reported VARCHAR(1024) NOT NULL, + reason VARCHAR(255) NOT NULL, + created BIGINT NOT NULL, + raw LONG VARCHAR NOT NULL +); +CREATE INDEX ofSpamReport_created_reporter_id ON ofSpamReport (created, reporter); +CREATE INDEX ofSpamReport_created_reported_id ON ofSpamReport (created, reported); + +UPDATE ofVersion SET version = 37 WHERE name = 'openfire'; diff --git a/distribution/src/database/upgrade/37/openfire_hsqldb.sql b/distribution/src/database/upgrade/37/openfire_hsqldb.sql new file mode 100644 index 0000000000..5854ca120d --- /dev/null +++ b/distribution/src/database/upgrade/37/openfire_hsqldb.sql @@ -0,0 +1,11 @@ +CREATE TABLE ofSpamReport ( + reporter VARCHAR(1024) NOT NULL, + reported VARCHAR(1024) NOT NULL, + reason VARCHAR(255) NOT NULL, + created BIGINT NOT NULL, + raw LONGVARCHAR NOT NULL +); +CREATE INDEX ofSpamReport_created_reporter_id ON ofSpamReport (created, reporter); +CREATE INDEX ofSpamReport_created_reported_id ON ofSpamReport (created, reported); + +UPDATE ofVersion SET version = 37 WHERE name = 'openfire'; diff --git a/distribution/src/database/upgrade/37/openfire_mysql.sql b/distribution/src/database/upgrade/37/openfire_mysql.sql new file mode 100644 index 0000000000..613cf3a31a --- /dev/null +++ b/distribution/src/database/upgrade/37/openfire_mysql.sql @@ -0,0 +1,11 @@ +CREATE TABLE ofSpamReport ( + reporter VARCHAR(1024) NOT NULL, + reported VARCHAR(1024) NOT NULL, + reason VARCHAR(255) NOT NULL, + created BIGINT NOT NULL, + raw TEXT NOT NULL, + INDEX ofSpamReport_created_reporter_id (created, reporter), + INDEX ofSpamReport_created_reported_id (created, reported) +); + +UPDATE ofVersion SET version = 37 WHERE name = 'openfire'; diff --git a/distribution/src/database/upgrade/37/openfire_oracle.sql b/distribution/src/database/upgrade/37/openfire_oracle.sql new file mode 100644 index 0000000000..c2bd733b5a --- /dev/null +++ b/distribution/src/database/upgrade/37/openfire_oracle.sql @@ -0,0 +1,11 @@ +CREATE TABLE ofSpamReport ( + reporter VARCHAR2(1024) NOT NULL, + reported VARCHAR2(1024) NOT NULL, + reason VARCHAR2(255) NOT NULL, + created INTEGER NOT NULL, + "raw" CLOB NOT NULL +); +CREATE INDEX ofSpamReport_created_reporter_id ON ofSpamReport (created, reporter); +CREATE INDEX ofSpamReport_created_reported_id ON ofSpamReport (created, reported); + +UPDATE ofVersion SET version = 37 WHERE name = 'openfire'; diff --git a/distribution/src/database/upgrade/37/openfire_postgresql.sql b/distribution/src/database/upgrade/37/openfire_postgresql.sql new file mode 100644 index 0000000000..72aee81f02 --- /dev/null +++ b/distribution/src/database/upgrade/37/openfire_postgresql.sql @@ -0,0 +1,11 @@ +CREATE TABLE ofSpamReport ( + reporter VARCHAR(1024) NOT NULL, + reported VARCHAR(1024) NOT NULL, + reason VARCHAR(255) NOT NULL, + created BIGINT NOT NULL, + raw TEXT NOT NULL +); +CREATE INDEX ofSpamReport_created_reporter_id ON ofSpamReport (created, reporter); +CREATE INDEX ofSpamReport_created_reported_id ON ofSpamReport (created, reported); + +UPDATE ofVersion SET version = 37 WHERE name = 'openfire'; diff --git a/distribution/src/database/upgrade/37/openfire_sqlserver.sql b/distribution/src/database/upgrade/37/openfire_sqlserver.sql new file mode 100644 index 0000000000..6e73b91df4 --- /dev/null +++ b/distribution/src/database/upgrade/37/openfire_sqlserver.sql @@ -0,0 +1,11 @@ +CREATE TABLE ofSpamReport ( + reporter VARCHAR(1024) NOT NULL, + reported VARCHAR(1024) NOT NULL, + reason VARCHAR(255) NOT NULL, + created BIGINT NOT NULL, + raw NVARCHAR(MAX) NOT NULL +); +CREATE INDEX ofSpamReport_created_reporter_id ON ofSpamReport (created, reporter); +CREATE INDEX ofSpamReport_created_reported_id ON ofSpamReport (created, reported); + +UPDATE ofVersion SET version = 37 WHERE name = 'openfire'; diff --git a/distribution/src/database/upgrade/37/openfire_sybase.sql b/distribution/src/database/upgrade/37/openfire_sybase.sql new file mode 100644 index 0000000000..2b18489249 --- /dev/null +++ b/distribution/src/database/upgrade/37/openfire_sybase.sql @@ -0,0 +1,11 @@ +CREATE TABLE ofSpamReport ( + reporter NVARCHAR(1024) NOT NULL, + reported NVARCHAR(1024) NOT NULL, + reason NVARCHAR(255) NOT NULL, + created INTEGER NOT NULL, + "raw" LONG VARCHAR NOT NULL +); +CREATE INDEX ofSpamReport_created_reporter_id ON ofSpamReport (created, reporter); +CREATE INDEX ofSpamReport_created_reported_id ON ofSpamReport (created, reported); + +UPDATE ofVersion SET version = 37 WHERE name = 'openfire'; diff --git a/documentation/database-guide.html b/documentation/database-guide.html index a44829bd13..60cfec252a 100644 --- a/documentation/database-guide.html +++ b/documentation/database-guide.html @@ -86,10 +86,10 @@
ofSpamReport (spam rapportage) | +|||
---|---|---|---|
Column Name | +Type | +Length | +Description | +
reporter | +VARCHAR | +1024 | +JID of entity that is reporting the spam | +
reported | +VARCHAR | +1024 | +JID of entity that is being reported (the 'offender') | +
reason | +VARCHAR | +255 | +Identifier (typically a namespace) for the type of spam report | +
created | +NUMBER | ++ | Epoch millis of the creation time of the report | +
raw | +CLOB | ++ | XML representation of the report | +