|
1 -- Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
|
2 -- Version 1.1.1 |
|
3 -- Copyright (C) 2006-2007 Dan Fuhry |
|
4 |
|
5 -- This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
|
6 -- as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
|
7 |
|
8 -- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
|
9 -- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
|
10 |
|
11 -- 1.0-1.1-mysql.sql - Enano 1.0.x to 1.1.x migration queries, MySQL |
|
12 |
|
13 ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN user_lang smallint(5) NOT NULL; |
|
14 ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN user_has_avatar tinyint(1) NOT NULL; |
|
15 ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN avatar_type ENUM('jpg', 'png', 'gif') NOT NULL; |
|
16 |
|
17 CREATE TABLE {{TABLE_PREFIX}}lockout( |
|
18 id int(12) NOT NULL auto_increment, |
|
19 ipaddr varchar(40) NOT NULL, |
|
20 action ENUM('credential', 'level') NOT NULL DEFAULT 'credential', |
|
21 timestamp int(12) NOT NULL DEFAULT 0, |
|
22 PRIMARY KEY ( id ) |
|
23 ) CHARACTER SET `utf8`; |
|
24 |
|
25 CREATE TABLE {{TABLE_PREFIX}}language( |
|
26 lang_id smallint(5) NOT NULL auto_increment, |
|
27 lang_code varchar(16) NOT NULL, |
|
28 lang_name_default varchar(64) NOT NULL, |
|
29 lang_name_native varchar(64) NOT NULL, |
|
30 last_changed int(12) NOT NULL DEFAULT 0, |
|
31 PRIMARY KEY ( lang_id ) |
|
32 ) CHARACTER SET `utf8`; |
|
33 |
|
34 CREATE TABLE {{TABLE_PREFIX}}language_strings( |
|
35 string_id bigint(15) NOT NULL auto_increment, |
|
36 lang_id smallint(5) NOT NULL, |
|
37 string_category varchar(32) NOT NULL, |
|
38 string_name varchar(64) NOT NULL, |
|
39 string_content longtext NOT NULL, |
|
40 PRIMARY KEY ( string_id ) |
|
41 ); |
|
42 |
|
43 UPDATE {{TABLE_PREFIX}}sidebar SET block_name = '{lang:sidebar_title_navigation}', block_type = 1, block_content = '[[Main_Page|{lang:sidebar_btn_home}]]' WHERE item_id = 1; |
|
44 UPDATE {{TABLE_PREFIX}}sidebar SET block_name = '{lang:sidebar_title_tools}', block_type = 1, block_content = '[[$NS_SPECIAL$CreatePage|{lang:sidebar_btn_createpage}]]\n[[$NS_SPECIAL$UploadFile|{lang:sidebar_btn_uploadfile}]]\n[[$NS_SPECIAL$SpecialPages|{lang:sidebar_btn_specialpages}]]\n{if auth_admin}\n$ADMIN_LINK$\n[[$NS_SPECIAL$EditSidebar|{lang:sidebar_btn_editsidebar}]]\n{/if}' WHERE item_id = 2; |
|
45 UPDATE {{TABLE_PREFIX}}sidebar SET block_name = '$USERNAME$', block_type = 1, block_content = '[[$NS_USER$$USERNAME$|{lang:sidebar_btn_userpage}]]\n[[$NS_SPECIAL$Contributions/$USERNAME$|{lang:sidebar_btn_mycontribs}]]\n{if user_logged_in}\n[[$NS_SPECIAL$Preferences|{lang:sidebar_btn_preferences}]]\n[[$NS_SPECIAL$PrivateMessages|{lang:sidebar_btn_privatemessages}]]\n[[$NS_SPECIAL$Usergroups|{lang:sidebar_btn_groupcp}]]\n$THEME_LINK$\n{/if}\n{if user_logged_in}\n$LOGOUT_LINK$\n{else}\n[[$NS_SPECIAL$Register|{lang:sidebar_btn_register}]]\n$LOGIN_LINK$\n[[$NS_SPECIAL$Login/$NS_SPECIAL$PrivateMessages|{lang:sidebar_btn_privatemessages}]]\n{/if}' WHERE item_id = 3; |
|
46 UPDATE {{TABLE_PREFIX}}sidebar SET block_name = '{lang:sidebar_title_search}', block_type = 1, block_content = '<div class="slideblock2" style="padding: 0px;"><form action="$CONTENTPATH$$NS_SPECIAL$Search" method="get" style="padding: 0; margin: 0;"><p><input type="hidden" name="title" value="$NS_SPECIAL$Search" />$INPUT_AUTH$<input name="q" alt="Search box" type="text" size="10" style="width: 70%" /> <input type="submit" value="{lang:sidebar_btn_search_go}" style="width: 20%" /></p></form></div>' WHERE item_id = 4; |
|
47 UPDATE {{TABLE_PREFIX}}sidebar SET block_name = '{lang:sidebar_title_links}', block_type = 4, block_content = 'Links' WHERE item_id = 5; |
|
48 |