Aizhuli90 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/115238

Change subject: added simple schema for db
......................................................................

added simple schema for db

Change-Id: Iae727ec7047bd0902dd34bd38cfe82a1188a6b6a
---
A OpenBadgesLog.sql
1 file changed, 27 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenBadges 
refs/changes/38/115238/1

diff --git a/OpenBadgesLog.sql b/OpenBadgesLog.sql
new file mode 100644
index 0000000..308e285
--- /dev/null
+++ b/OpenBadgesLog.sql
@@ -0,0 +1,27 @@
+--
+-- OpenBadges logging schema
+-- Records relevant information regarding issuing of badges
+--
+
+CREATE TABLE IF NOT EXISTS /*_*/openbadges_assertion (
+       obl_id int NOT NULL PRIMARY KEY auto_increment,         -- unique id
+       obl_timestamp binary(14) NOT NULL,                      -- timestamp
+    obl_receiver int(11) NOT NULL,                     -- user id of the 
receiver
+       obl_badge_url varchar(255) NOT NULL,                        -- url of 
the badge for the receiver
+       obl_badge_img longblob NOT NULL,                                        
-- image of the badge
+       obl_badge_evidence varchar(255) NOT NULL,                       -- 
criteria for receiving the badge 
+       obl_expiration date                                                     
                -- expiration of the badge if any
+)
+
+CREATE TABLE IF NOT EXISTS /*_*/openbadges_class (
+    obl_badge_id int NOT NULL PRIMARY KEY,                             -- 
unique id 
+       obl_name varchar(64) NOT NULL,                                          
-- name of the achievement 
+       obl_description blob NOT NULL,                                          
-- description of the badge
+       obl_badge_image blob NOT NULL,                                          
-- image of the badge 
+       obl_criteria varchar(255) NOT NULL,                             -- 
criteria for earning the badge; might be URL
+       obl_issuer int NOT NULL,                                                
        -- id of the issuer 
+       obl_tags blob NOT NULL                                                  
        -- list of tags that describe the achievement
+)/DBTableOptions*/;
+
+CREATE INDEX /*i*/wll_timestamp ON /*_*/openbadges_assertion (wll_timestamp);
+

-- 
To view, visit https://gerrit.wikimedia.org/r/115238
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae727ec7047bd0902dd34bd38cfe82a1188a6b6a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenBadges
Gerrit-Branch: master
Gerrit-Owner: Aizhuli90 <aigabbas...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to