diff options
-rw-r--r-- | etherpad/src/plugins/twitterStyleTags/main.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/etherpad/src/plugins/twitterStyleTags/main.js b/etherpad/src/plugins/twitterStyleTags/main.js index 0154121..5f42dea 100644 --- a/etherpad/src/plugins/twitterStyleTags/main.js +++ b/etherpad/src/plugins/twitterStyleTags/main.js @@ -1,6 +1,8 @@ import("etherpad.log"); import("plugins.twitterStyleTags.hooks"); import("plugins.twitterStyleTags.static.js.main"); +import("sqlbase.sqlobj"); +import("sqlbase.sqlcommon"); function init() { this.hooks = ['handlePath', 'aceGetFilterStack', 'aceCreateDomLine', 'padModelWriteToDB']; @@ -17,6 +19,22 @@ function init() { function install() { log.info("Installing Twitter-style tags"); + + sqlobj.createTable('TAG', { + ID: 'int not null '+sqlcommon.autoIncrementClause()+' primary key', + NAME: 'varchar(128) character set utf8 collate utf8_bin not null', + }); + + sqlobj.createTable('PAD_TAG', { + PAD_ID: 'varchar(128) character set utf8 collate utf8_bin not null references PAD_META(ID)', + TAG_ID: 'int default NULL references TAG(ID)', + }); + + sqlobj.createTable('PAD_TAG_CACHE', { + PAD_ID: 'varchar(128) character set utf8 collate utf8_bin unique not null references PAD_META(ID)', + TAGS: 'varchar(1024) collate utf8_bin not null', + }); + } function uninstall() { |