Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/242100
Change subject: Move create SQL from comments to own files ...................................................................... Move create SQL from comments to own files Change-Id: I5919012b79d5e83d86b7f44cb920d275717289c0 --- A sql/create/wikidata_getclaims_property_use.sql A sql/create/wikidata_site_stats.sql A sql/create/wikidata_social.sql M src/wikidata_getclaims_property_use.sh M src/wikidata_site_stats.sh M src/wikidata_social.php 6 files changed, 31 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-wikidata-data refs/changes/00/242100/1 diff --git a/sql/create/wikidata_getclaims_property_use.sql b/sql/create/wikidata_getclaims_property_use.sql new file mode 100644 index 0000000..c85d2c3 --- /dev/null +++ b/sql/create/wikidata_getclaims_property_use.sql @@ -0,0 +1,6 @@ +CREATE TABLE IF NOT EXISTS staging.wikidata_getclaims_property_use + ( + date DATE NOT NULL, + property VARCHAR(6) NOT NULL, + count INT(12) + ); \ No newline at end of file diff --git a/sql/create/wikidata_site_stats.sql b/sql/create/wikidata_site_stats.sql new file mode 100644 index 0000000..e7865e9 --- /dev/null +++ b/sql/create/wikidata_site_stats.sql @@ -0,0 +1,10 @@ +CREATE TABLE IF NOT EXISTS wikidata_site_stats + ( + date DATE NOT NULL, + total_views BIGINT(20) NOT NULL, + total_edits BIGINT(20) NOT NULL, + good_articles BIGINT(20) NOT NULL, + total_pages BIGINT(20) NOT NULL, + users BIGINT(20) NOT NULL, + active_users BIGINT(20) NOT NULL + ); \ No newline at end of file diff --git a/sql/create/wikidata_social.sql b/sql/create/wikidata_social.sql new file mode 100644 index 0000000..c68cf06 --- /dev/null +++ b/sql/create/wikidata_social.sql @@ -0,0 +1,12 @@ +CREATE TABLE IF NOT EXISTS wikidata_social + ( + date DATE NOT NULL, + twitter INT(6), + facebook INT(6), + googleplus INT(6), + identica INT(6), + newsletter INT(6), + mail INT(6), + techmail INT(6), + irc INT(6) + ); \ No newline at end of file diff --git a/src/wikidata_getclaims_property_use.sh b/src/wikidata_getclaims_property_use.sh index 03b558b..22a69f9 100644 --- a/src/wikidata_getclaims_property_use.sh +++ b/src/wikidata_getclaims_property_use.sh @@ -1,8 +1,6 @@ #!/bin/bash # -# A table needs to exist for this script to function: -# CREATE TABLE IF NOT EXISTS wikidata_getclaims_property_use ( date DATE NOT NULL, property VARCHAR(6) NOT NULL, count INT(12) ); -# +# A table needs to exist for this script to function (see the file in /sql/create) # If I want data for the 22nd I need logs rotated on 22nd and 23rd diff --git a/src/wikidata_site_stats.sh b/src/wikidata_site_stats.sh index 9eaff53..800b33a 100644 --- a/src/wikidata_site_stats.sh +++ b/src/wikidata_site_stats.sh @@ -1,8 +1,6 @@ #!/bin/bash # -# A table needs to exist for this script to function: -# CREATE TABLE IF NOT EXISTS wikidata_site_stats ( date DATE NOT NULL, total_views BIGINT(20) NOT NULL, total_edits BIGINT(20) NOT NULL, good_articles BIGINT(20) NOT NULL, total_pages BIGINT(20) NOT NULL, users BIGINT(20) NOT NULL, active_users BIGINT(20) NOT NULL ); -# +# A table needs to exist for this script to function (see the file in /sql/create) dateISO=`date --date=today --iso-8601=date` diff --git a/src/wikidata_social.php b/src/wikidata_social.php index 3489211..fe22dea 100644 --- a/src/wikidata_social.php +++ b/src/wikidata_social.php @@ -11,9 +11,7 @@ * mm-wikidatatech-pass mailpass2 * mm-user u...@domain.foo * - * This script also requires a database table to write into! - * //date,twitter,facebook,googleplus,identica,newsletter,mail,techmail,irc - * CREATE TABLE IF NOT EXISTS wikidata_social ( date DATE NOT NULL, twitter INT(6), facebook INT(6), googleplus INT(6), identica INT(6), newsletter INT(6), mail INT(6), techmail INT(6), irc INT(6) ); + * This script also requires a database table to write into (see the file in /sql/create) */ libxml_use_internal_errors( true ); -- To view, visit https://gerrit.wikimedia.org/r/242100 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5919012b79d5e83d86b7f44cb920d275717289c0 Gerrit-PatchSet: 1 Gerrit-Project: analytics/limn-wikidata-data Gerrit-Branch: master Gerrit-Owner: Addshore <addshorew...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits