aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEgil Moeller <egil.moller@freecode.no>2010-03-25 21:16:08 +0100
committerEgil Moeller <egil.moller@freecode.no>2010-03-25 21:16:08 +0100
commit27271e4cc005b44ff8254d7cfa753ec4316194f3 (patch)
tree0161ffd4fb9ac1306a74123d8b013fde167afa74
parent433c3f5f2a74511d454debf7c4c129508eacd3df (diff)
downloadetherpad-27271e4cc005b44ff8254d7cfa753ec4316194f3.tar.gz
etherpad-27271e4cc005b44ff8254d7cfa753ec4316194f3.tar.xz
etherpad-27271e4cc005b44ff8254d7cfa753ec4316194f3.zip
Added create table statements
Diffstat (limited to '')
-rw-r--r--etherpad/src/plugins/twitterStyleTags/main.js18
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() {