Skip to content

Commit

Permalink
Fixed MySQL bug when moving topics. Added again wrongly deleted fireb…
Browse files Browse the repository at this point in the history
…ird script.
  • Loading branch information
vzrus committed Feb 7, 2012
1 parent 66ced5e commit e66644d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
34 changes: 34 additions & 0 deletions firebird/YetAnotherForum.NET/install/firebird/test_drop.sql
@@ -0,0 +1,34 @@
/* Yet Another Forum.NET MySQL data layer by vzrus
* Copyright (C) 2006-2012 Vladimir Zakharov
* https://github.com/vzrus
* http://sourceforge.net/projects/yaf-datalayers/
* This program 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; version 2 only
* General class structure is based on MS SQL Server code,
* created by YAF developers
*
* http://www.yetanotherforum.net/
* This program 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;version 2 only
* of the License.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

EXECUTE BLOCK
AS
BEGIN
IF (EXISTS(SELECT 1
FROM RDB$PROCEDURES a WHERE a.RDB$PROCEDURE_NAME='objQual_P_CREATEAPPLICATION')) THEN
EXECUTE STATEMENT 'DROP PROCEDURE objQual_P_CREATEAPPLICATION';
END
--GO
9 changes: 8 additions & 1 deletion mysql/YetAnotherForum.NET/install/mysql/tables.sql
Expand Up @@ -535,7 +535,7 @@ CREATE TABLE IF NOT EXISTS {databaseName}.{objectQualifier}Topic
`UserName` VARCHAR(128) CHARACTER SET {databaseEncoding} COLLATE {databaseEncoding}_{databaseCollation} NULL,
`Posted` DATETIME NOT NULL,
`Topic` VARCHAR(255) CHARACTER SET {databaseEncoding} COLLATE {databaseEncoding}_{databaseCollation} NOT NULL,
`Status` VARCHAR(255) CHARACTER SET {databaseEncoding} COLLATE {databaseEncoding}_{databaseCollation} NOT NULL,
`Status` VARCHAR(255) CHARACTER SET {databaseEncoding} COLLATE {databaseEncoding}_{databaseCollation} NULL,
`Styles` VARCHAR(255) NULL,
`Description` VARCHAR(255) CHARACTER SET {databaseEncoding} COLLATE {databaseEncoding}_{databaseCollation} NULL,
`Views` INT NOT NULL,
Expand Down Expand Up @@ -916,6 +916,13 @@ IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
AND COLUMN_NAME='Status' LIMIT 1) THEN
ALTER TABLE {databaseName}.{objectQualifier}Topic ADD `Status` VARCHAR(255) CHARACTER SET {databaseEncoding} COLLATE {databaseEncoding}_{databaseCollation} NULL AFTER `Topic`;
END IF;

IF EXISTS (SELECT 1 FROM information_schema.COLUMNS
WHERE LOWER(TABLE_SCHEMA)=LOWER('{databaseName}') AND
(TABLE_NAME='{objectQualifier}Topic' OR TABLE_NAME=LOWER('{objectQualifier}Topic'))
AND COLUMN_NAME='Status' LIMIT 1) THEN
ALTER TABLE {databaseName}.{objectQualifier}Topic CHANGE `Status` `Status` VARCHAR(255) CHARACTER SET {databaseEncoding} COLLATE {databaseEncoding}_{databaseCollation} NULL;
END IF;

-- Rank Table
IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
Expand Down

0 comments on commit e66644d

Please sign in to comment.