diff options
author | Egil Moeller <egil.moller@freecode.no> | 2010-03-12 21:08:28 +0100 |
---|---|---|
committer | Egil Moeller <egil.moller@freecode.no> | 2010-03-12 21:08:28 +0100 |
commit | 648f6a226b076424e9df533107a5c0cf1804293a (patch) | |
tree | b43959b3d14d74f3533c628d32fd47243684338c | |
parent | e4ddcd93e291047717843a61d5511719fbec3901 (diff) | |
download | etherpad-648f6a226b076424e9df533107a5c0cf1804293a.tar.gz etherpad-648f6a226b076424e9df533107a5c0cf1804293a.tar.xz etherpad-648f6a226b076424e9df533107a5c0cf1804293a.zip |
Oups, last commit committed the tagging support, but missed this file
-rw-r--r-- | trunk/etherpad/src/etherpad/db_migrations/m0038_pad_tag_tables.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/trunk/etherpad/src/etherpad/db_migrations/m0038_pad_tag_tables.js b/trunk/etherpad/src/etherpad/db_migrations/m0038_pad_tag_tables.js new file mode 100644 index 0000000..69ae6e4 --- /dev/null +++ b/trunk/etherpad/src/etherpad/db_migrations/m0038_pad_tag_tables.js @@ -0,0 +1,35 @@ +/** + * Copyright 2009 RedHog, Egil Möller <egil.moller@piratpartiet.se>. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import("sqlbase.sqlobj"); +import("sqlbase.sqlcommon"); + +function run() { + 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', + }); +} |