mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Adds a database versioning schema table (#28897)
* Adds a database versioning schema table All it does right now is warn admins when the version in the db gets behind the defined version in the compile options file This also moves the db connection warning messages to the CheckSchemaVersion proc in world, out of the roundid proc as it's the first db proc called in a world round * Update database_changelog.txt * Update tgstation_schema.sql * Update tgstation_schema_prefixed.sql
This commit is contained in:
@@ -1,3 +1,22 @@
|
||||
28 June 2017, by oranges
|
||||
Added schema_revision to store the current db revision, why start at 3.0?
|
||||
|
||||
because:
|
||||
15:09 <+MrStonedOne> 1.0 was erro, 2.0 was when i removed erro_, 3.0 was when jordie made all the strings that hold numbers numbers
|
||||
|
||||
CREATE TABLE `schema_revision` (
|
||||
`major` TINYINT(3) UNSIGNED NOT NULL ,
|
||||
`minor` TINYINT(3) UNSIGNED NOT NULL ,
|
||||
`date` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL,
|
||||
PRIMARY KEY ( `major`,`minor` )
|
||||
) ENGINE = INNODB;
|
||||
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (3, 0);
|
||||
|
||||
Remember to add a prefix to the table name if you use them.
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
26 June 2017, by Jordie0608
|
||||
|
||||
Modified table 'poll_option', adding the column 'default_percentage_calc'.
|
||||
|
||||
@@ -387,6 +387,17 @@ CREATE TABLE `round` (
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
--
|
||||
-- Table structure for table `schema_revision`
|
||||
--
|
||||
DROP TABLE IF EXISTS `schema_revision`;
|
||||
CREATE TABLE `schema_revision` (
|
||||
`major` TINYINT(3) unsigned NOT NULL,
|
||||
`minor` TINYINT(3) unsigned NOT NULL,
|
||||
`date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`major`, `minor`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
|
||||
@@ -387,6 +387,17 @@ CREATE TABLE `SS13_round` (
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
--
|
||||
-- Table structure for table `SS13_schema_revision`
|
||||
--
|
||||
DROP TABLE IF EXISTS `SS13_schema_revision`;
|
||||
CREATE TABLE `SS13_schema_revision` (
|
||||
`major` TINYINT(3) unsigned NOT NULL,
|
||||
`minor` TINYINT(3) unsigned NOT NULL,
|
||||
`date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`major`,`minor`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
|
||||
Reference in New Issue
Block a user