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:
oranges
2017-06-29 18:47:17 +12:00
committed by Jordie
parent 503a20119b
commit 0dfa3d8aa2
5 changed files with 64 additions and 4 deletions

View File

@@ -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 */;