[6803] [sql/updates/2008_11_07_01_characters_character_db_version.sql sql/updates/2008_11_07_02_realmd_realmd_db_version.sql] Implement characters/realmd DB version requiremnts checks support.

Note: each DB (mangos/charactes/realmd) have independent checks for version.
Also fixed required_* field name in mangos DB. It need updated with each sql update applied to related DB.
This commit is contained in:
VladimirMangos 2008-11-08 04:36:50 +03:00
parent 85c6e30bed
commit 7e10e20810
7 changed files with 105 additions and 22 deletions

View file

@ -15,6 +15,26 @@
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `character_db_version`
--
DROP TABLE IF EXISTS `character_db_version`;
CREATE TABLE `character_db_version` (
`required_2008_11_07_01_characters_character_db_version` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB';
--
-- Dumping data for table `character_db_version`
--
LOCK TABLES `character_db_version` WRITE;
/*!40000 ALTER TABLE `character_db_version` DISABLE KEYS */;
INSERT INTO `character_db_version` VALUES
(NULL);
/*!40000 ALTER TABLE `character_db_version` ENABLE KEYS */;
UNLOCK TABLES;
-- --
-- Table structure for table `arena_team` -- Table structure for table `arena_team`
-- --

View file

@ -15,6 +15,27 @@
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `db_version`
--
DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
`required_2008_11_01_02_mangos_command` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
-- Dumping data for table `db_version`
--
LOCK TABLES `db_version` WRITE;
/*!40000 ALTER TABLE `db_version` DISABLE KEYS */;
INSERT INTO `db_version` VALUES
('Mangos default database.',NULL);
/*!40000 ALTER TABLE `db_version` ENABLE KEYS */;
UNLOCK TABLES;
-- --
-- Table structure for table `areatrigger_involvedrelation` -- Table structure for table `areatrigger_involvedrelation`
-- --
@ -790,27 +811,6 @@ LOCK TABLES `creature_template_addon` WRITE;
/*!40000 ALTER TABLE `creature_template_addon` ENABLE KEYS */; /*!40000 ALTER TABLE `creature_template_addon` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
--
-- Table structure for table `db_version`
--
DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
`required_2008_10_29_03_mangos_db_version` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
-- Dumping data for table `db_version`
--
LOCK TABLES `db_version` WRITE;
/*!40000 ALTER TABLE `db_version` DISABLE KEYS */;
INSERT INTO `db_version` VALUES
('Mangos default database.',NULL);
/*!40000 ALTER TABLE `db_version` ENABLE KEYS */;
UNLOCK TABLES;
-- --
-- Table structure for table `disenchant_loot_template` -- Table structure for table `disenchant_loot_template`
-- --

View file

@ -15,6 +15,26 @@
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `realmd_db_version`
--
DROP TABLE IF EXISTS `realmd_db_version`;
CREATE TABLE `realmd_db_version` (
`required_2008_11_07_02_realmd_realmd_db_version` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB';
--
-- Dumping data for table `realmd_db_version`
--
LOCK TABLES `realmd_db_version` WRITE;
/*!40000 ALTER TABLE `realmd_db_version` DISABLE KEYS */;
INSERT INTO `realmd_db_version` VALUES
(NULL);
/*!40000 ALTER TABLE `realmd_db_version` ENABLE KEYS */;
UNLOCK TABLES;
-- --
-- Table structure for table `account` -- Table structure for table `account`
-- --

View file

@ -0,0 +1,19 @@
--
-- Table structure for table `character_db_version`
--
DROP TABLE IF EXISTS `character_db_version`;
CREATE TABLE `character_db_version` (
`required_2008_11_07_01_characters_character_db_version` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB';
--
-- Dumping data for table `character_db_version`
--
LOCK TABLES `character_db_version` WRITE;
/*!40000 ALTER TABLE `character_db_version` DISABLE KEYS */;
INSERT INTO `character_db_version` VALUES
(NULL);
/*!40000 ALTER TABLE `character_db_version` ENABLE KEYS */;
UNLOCK TABLES;

View file

@ -0,0 +1,20 @@
--
-- Table structure for table `realmd_db_version`
--
DROP TABLE IF EXISTS `realmd_db_version`;
CREATE TABLE `realmd_db_version` (
`required_2008_11_07_02_realmd_realmd_db_version` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB';
--
-- Dumping data for table `realmd_db_version`
--
LOCK TABLES `realmd_db_version` WRITE;
/*!40000 ALTER TABLE `realmd_db_version` DISABLE KEYS */;
INSERT INTO `realmd_db_version` VALUES
(NULL);
/*!40000 ALTER TABLE `realmd_db_version` ENABLE KEYS */;
UNLOCK TABLES;

View file

@ -123,6 +123,8 @@ pkgdata_DATA = \
2008_10_31_03_mangos_command.sql \ 2008_10_31_03_mangos_command.sql \
2008_11_01_01_mangos_mangos_string.sql \ 2008_11_01_01_mangos_mangos_string.sql \
2008_11_01_02_mangos_command.sql \ 2008_11_01_02_mangos_command.sql \
2008_11_07_01_characters_character_db_version.sql \
2008_11_07_02_realmd_realmd_db_version.sql \
README README
## Additional files to include when running 'make dist' ## Additional files to include when running 'make dist'
@ -227,4 +229,6 @@ EXTRA_DIST = \
2008_10_31_03_mangos_command.sql \ 2008_10_31_03_mangos_command.sql \
2008_11_01_01_mangos_mangos_string.sql \ 2008_11_01_01_mangos_mangos_string.sql \
2008_11_01_02_mangos_command.sql \ 2008_11_01_02_mangos_command.sql \
2008_11_07_01_characters_character_db_version.sql \
2008_11_07_02_realmd_realmd_db_version.sql \
README README

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "6802" #define REVISION_NR "6803"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__