Ignore:
Timestamp:
Sep 1, 2013, 11:37:27 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Třída Module nahrazena třídami Model, View, Controller.
  • Přidáno: Modul Wiki.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/Updates.php

    r552 r565  
    343343}
    344344
     345function UpdateTo565($Manager)
     346
     347  $Manager->Execute('CREATE TABLE IF NOT EXISTS `WikiPage` (
     348    `Id` int(11) NOT NULL AUTO_INCREMENT,
     349    `Name` varchar(255) NOT NULL,
     350    `NormalizedName` varchar(255) NOT NULL,
     351    `VisibleInMenu` int(11) NOT NULL,
     352    PRIMARY KEY (`Id`),
     353    UNIQUE KEY `Name` (`Name`),
     354    KEY `VisibleInMenu` (`VisibleInMenu`)
     355    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;');
     356  $Manager->Execute('CREATE TABLE IF NOT EXISTS `WikiPageContent` (
     357    `Id` int(11) NOT NULL AUTO_INCREMENT,
     358    `Page` int(11) NOT NULL,
     359    `Time` datetime NOT NULL,
     360    `Content` text NOT NULL,
     361    `User` int(11) NOT NULL,
     362    PRIMARY KEY (`Id`),
     363    KEY `User` (`User`),
     364        KEY `Page` (`Page`)
     365    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;');
     366    $Manager->Execute('ALTER TABLE `WikiPageContent`
     367    ADD CONSTRAINT `WikiPageContent_ibfk_2` FOREIGN KEY (`Page`) REFERENCES `WikiPage` (`Id`),
     368ADD CONSTRAINT `WikiPageContent_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`ID`);');
     369}
    345370
    346371$Updates = array(
     
    363388  549 => array('Revision' => 550, 'Function' => 'UpdateTo550'),
    364389  550 => array('Revision' => 551, 'Function' => 'UpdateTo551'),
     390  551 => array('Revision' => 565, 'Function' => 'UpdateTo565'),
    365391);
Note: See TracChangeset for help on using the changeset viewer.