218 lines
8.9 KiB
XML
218 lines
8.9 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!-- ***** BEGIN LICENSE BLOCK *****
|
|
- This file is part of DotClear.
|
|
- Copyright (c) 2004 Olivier Meunier and contributors. All rights
|
|
- reserved.
|
|
-
|
|
- DotClear is free software; you can redistribute it and/or modify
|
|
- it under the terms of the GNU General Public License as published by
|
|
- the Free Software Foundation; either version 2 of the License, or
|
|
- (at your option) any later version.
|
|
-
|
|
- DotClear is distributed in the hope that it will be useful,
|
|
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
- GNU General Public License for more details.
|
|
-
|
|
- You should have received a copy of the GNU General Public License
|
|
- along with DotClear; if not, write to the Free Software
|
|
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
-
|
|
- ***** END LICENSE BLOCK ***** -->
|
|
<database>
|
|
<!-- LOG -->
|
|
<action id="log" label="Create table %s" string="{{PREFIX}}log">
|
|
<test eq="neq" value="{{PREFIX}}log" label="Table %s exists"
|
|
string="{{PREFIX}}log" type="wrn">SHOW TABLES LIKE '{{PREFIX}}log'</test>
|
|
CREATE TABLE `{{PREFIX}}log` (
|
|
`user_id` varchar(32) binary NOT NULL default '',
|
|
`table` varchar(255) NOT NULL default '',
|
|
`key` varchar(255) NOT NULL default '',
|
|
`date` datetime NOT NULL default '0000-00-00 00:00:00',
|
|
`ip` varchar(15) default NULL,
|
|
`log` varchar(255) NOT NULL default ''
|
|
) TYPE=MyISAM
|
|
</action>
|
|
|
|
<!-- LINK -->
|
|
<action id="link" label="Create table %s" string="{{PREFIX}}link">
|
|
<test eq="neq" value="{{PREFIX}}link" label="Table %s exists"
|
|
string="{{PREFIX}}link" type="wrn">SHOW TABLES LIKE '{{PREFIX}}link'</test>
|
|
CREATE TABLE `{{PREFIX}}link` (
|
|
`link_id` int(11) NOT NULL auto_increment,
|
|
`href` varchar(255) NOT NULL default '',
|
|
`label` varchar(255) NOT NULL default '',
|
|
`title` varchar(255) NOT NULL default '',
|
|
`lang` char(2) NOT NULL default '',
|
|
`position` int(11) NOT NULL default '0',
|
|
PRIMARY KEY (`link_id`)
|
|
) TYPE=MyISAM
|
|
</action>
|
|
|
|
<action id="link_rel" label="Add field %s" string="{{PREFIX}}link.rel">
|
|
<test eq="neq" value="rel" label="Field %s exists"
|
|
string="{{PREFIX}}link.rel" type="wrn">
|
|
SHOW COLUMNS FROM `{{PREFIX}}link` LIKE 'rel'
|
|
</test>
|
|
ALTER TABLE `{{PREFIX}}link` ADD `rel` varchar(255)
|
|
AFTER `lang`
|
|
</action>
|
|
|
|
<!-- PING -->
|
|
<action id="ping" label="Create table %s" string="{{PREFIX}}ping">
|
|
<test eq="neq" value="{{PREFIX}}ping" label="Table %s exists"
|
|
string="{{PREFIX}}ping" type="wrn">SHOW TABLES LIKE '{{PREFIX}}ping'</test>
|
|
CREATE TABLE `{{PREFIX}}ping` (
|
|
`ping_id` int(11) NOT NULL auto_increment,
|
|
`post_id` int(11) NOT NULL default '0',
|
|
`ping_url` varchar(255) NOT NULL default '0',
|
|
`ping_dt` datetime default NULL,
|
|
PRIMARY KEY (`ping_id`)
|
|
) TYPE=MyISAM
|
|
</action>
|
|
|
|
<!-- SESSION -->
|
|
<action id="session" label="Create table %s" string="{{PREFIX}}session">
|
|
<test eq="neq" value="{{PREFIX}}session" label="Table %s exists"
|
|
string="{{PREFIX}}session" type="wrn">SHOW TABLES LIKE '{{PREFIX}}session'</test>
|
|
CREATE TABLE `{{PREFIX}}session` (
|
|
`ses_id` varchar(32) NOT NULL default '',
|
|
`ses_time` int(11) NOT NULL default '0',
|
|
`ses_start` int(11) NOT NULL default '0',
|
|
`ses_value` text NOT NULL,
|
|
PRIMARY KEY (`ses_id`)
|
|
) TYPE=MyISAM
|
|
</action>
|
|
|
|
<!-- USER
|
|
===================================================== -->
|
|
<!-- user_lang -->
|
|
<action id="user_lang" label="Add field %s" string="{{PREFIX}}user.user_lang">
|
|
<test eq="neq" value="user_lang" label="Field %s exists"
|
|
string="{{PREFIX}}user.user_lang" type="wrn">
|
|
SHOW COLUMNS FROM `{{PREFIX}}user` LIKE 'user_lang'
|
|
</test>
|
|
ALTER TABLE `{{PREFIX}}user` ADD `user_lang` VARCHAR(3)
|
|
</action>
|
|
|
|
<!-- user_delta -->
|
|
<action id="user_delta" label="Add field %s" string="{{PREFIX}}user.user_delta">
|
|
<test eq="neq" value="user_delta" label="Field %s exists"
|
|
string="{{PREFIX}}user.user_delta" type="wrn">
|
|
SHOW COLUMNS FROM `{{PREFIX}}user` LIKE 'user_delta'
|
|
</test>
|
|
ALTER TABLE `{{PREFIX}}user` ADD `user_delta` INTEGER(1) NOT NULL DEFAULT 0
|
|
</action>
|
|
|
|
<!-- user_post_pub -->
|
|
<action id="user_post_pub" label="Add field %s" string="{{PREFIX}}user.user_post_pub">
|
|
<test eq="neq" value="user_post_pub" label="Field %s exists"
|
|
string="{{PREFIX}}user.user_post_pub" type="wrn">
|
|
SHOW COLUMNS FROM `{{PREFIX}}user` LIKE 'user_post_pub'
|
|
</test>
|
|
ALTER TABLE `{{PREFIX}}user` ADD `user_post_pub` INTEGER(1) NOT NULL DEFAULT 0
|
|
</action>
|
|
|
|
|
|
<!-- POST
|
|
===================================================== -->
|
|
<!-- post_notes -->
|
|
<action id="post_notes" label="Add field %s" string="{{PREFIX}}post.post_notes">
|
|
<test eq="neq" value="post_notes" label="Field %s exists"
|
|
string="{{PREFIX}}post.post_notes" type="wrn">
|
|
SHOW COLUMNS FROM `{{PREFIX}}post` LIKE 'post_notes'
|
|
</test>
|
|
ALTER TABLE `{{PREFIX}}post` ADD `post_notes` LONGTEXT
|
|
AFTER `post_content_wiki`
|
|
</action>
|
|
|
|
<!-- post_lang -->
|
|
<action id="post_lang" label="Add field %s" string="{{PREFIX}}post.post_lang">
|
|
<test eq="neq" value="post_lang" label="Field %s exists"
|
|
string="{{PREFIX}}post.post_lang" type="wrn">
|
|
SHOW COLUMNS FROM `{{PREFIX}}post` LIKE 'post_lang'
|
|
</test>
|
|
ALTER TABLE `{{PREFIX}}post` ADD `post_lang` VARCHAR(5)
|
|
</action>
|
|
|
|
<!-- post_titre_url -->
|
|
<action id="post_titre_url" label="Add field %s" string="{{PREFIX}}post.post_titre_url">
|
|
<test eq="neq" value="post_titre_url" label="Field %s exists"
|
|
string="{{PREFIX}}post.post_titre_url" type="wrn">
|
|
SHOW COLUMNS FROM `{{PREFIX}}post` LIKE 'post_titre_url'
|
|
</test>
|
|
ALTER TABLE `{{PREFIX}}post` ADD `post_titre_url` VARCHAR(255)
|
|
AFTER `post_titre`
|
|
</action>
|
|
|
|
<!-- post_selected -->
|
|
<action id="post_selected" label="Add field %s" string="{{PREFIX}}post.post_selected">
|
|
<test eq="neq" value="post_selected" label="Field %s exists"
|
|
string="{{PREFIX}}post.post_selected" type="wrn">
|
|
SHOW COLUMNS FROM `{{PREFIX}}post` LIKE 'post_selected'
|
|
</test>
|
|
ALTER TABLE `{{PREFIX}}post` ADD `post_selected` INTEGER(1) NOT NULL
|
|
DEFAULT 0 AFTER `post_pub`
|
|
</action>
|
|
|
|
<!-- post_open_tb -->
|
|
<action id="post_open_tb" label="Add field %s" string="{{PREFIX}}post.post_open_tb">
|
|
<test eq="neq" value="post_open_tb" label="Field %s exists"
|
|
string="{{PREFIX}}post.post_open_tb" type="wrn">
|
|
SHOW COLUMNS FROM `{{PREFIX}}post` LIKE 'post_open_tb'
|
|
</test>
|
|
ALTER TABLE `{{PREFIX}}post` ADD `post_open_tb` INTEGER(1) NOT NULL
|
|
DEFAULT 0 AFTER `post_open_comment`
|
|
</action>
|
|
|
|
<!-- nb_trackback -->
|
|
<action id="nb_trackback" label="Add field %s" string="{{PREFIX}}post.nb_trackback">
|
|
<test eq="neq" value="nb_trackback" label="Field %s exists"
|
|
string="{{PREFIX}}post.nb_trackback" type="wrn">
|
|
SHOW COLUMNS FROM `{{PREFIX}}post` LIKE 'nb_trackback'
|
|
</test>
|
|
ALTER TABLE `{{PREFIX}}post` ADD `nb_trackback` INTEGER(11) NOT NULL
|
|
DEFAULT 0 AFTER `nb_comment`
|
|
</action>
|
|
|
|
<!-- post_gupddt -->
|
|
<action id="post_gupddt" label="Remove field %s" string="{{PREFIX}}post.post_gupddt">
|
|
<test eq="eq" value="post_gupddt" label="Field %s not present"
|
|
string="{{PREFIX}}post.post_gupddt" type="wrn">
|
|
SHOW COLUMNS FROM `{{PREFIX}}post` LIKE 'post_gupddt'
|
|
</test>
|
|
ALTER TABLE `{{PREFIX}}post` DROP `post_gupddt`
|
|
</action>
|
|
|
|
|
|
<!-- CATEGORIE
|
|
===================================================== -->
|
|
<!-- cat_ord -->
|
|
<action id="cat_ord" label="Add field %s" string="{{PREFIX}}categorie.cat_ord">
|
|
<test eq="neq" value="cat_ord" label="Field %s exists"
|
|
string="{{PREFIX}}categorie.cat_ord" type="wrn">
|
|
SHOW COLUMNS FROM `{{PREFIX}}categorie` LIKE 'cat_ord'
|
|
</test>
|
|
ALTER TABLE `{{PREFIX}}categorie` ADD `cat_ord` INTEGER
|
|
</action>
|
|
|
|
<!-- upd_open_tb -->
|
|
<action id="upd_open_tb" label="Update %s" string="{{PREFIX}}post.post_open_tb">
|
|
UPDATE `{{PREFIX}}post` SET `post_open_tb` = `post_open_comment`
|
|
</action>
|
|
|
|
<!-- INDEXES
|
|
====================================================== -->
|
|
<action id="fk_post_categorie" type="silent">
|
|
ALTER TABLE `{{PREFIX}}post` ADD INDEX `fk_post_categorie` (`cat_id`,`post_pub`)
|
|
</action>
|
|
<action id="fk_post_user" type="silent">
|
|
ALTER TABLE `{{PREFIX}}post` ADD INDEX `fk_post_user` (`user_id`,`post_pub`)
|
|
</action>
|
|
<action id="fk_comment_post" type="silent">
|
|
ALTER TABLE `{{PREFIX}}comment` ADD INDEX `fk_comment_post` (`post_id`)
|
|
</action>
|
|
<action id="fk_ping_post" type="silent">
|
|
ALTER TABLE `{{PREFIX}}ping` ADD INDEX `fk_ping_post` (`post_id`)
|
|
</action>
|
|
</database>
|