Last change
on this file was 636, checked in by george, 15 years ago |
- Opraveno: Načítání RSS aktualit z nově upravené tabulky.
|
File size:
1.0 KB
|
Line | |
---|
1 | ALTER TABLE `articles` CHANGE `id` `Id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
|
---|
2 | CHANGE `title` `Title` TEXT CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL ,
|
---|
3 | CHANGE `autor` `Author` TEXT CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL ,
|
---|
4 | CHANGE `category` `Category` INT( 11 ) NOT NULL DEFAULT '0',
|
---|
5 | CHANGE `text` `Content` TEXT CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL ,
|
---|
6 | CHANGE `date` `Time` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00';
|
---|
7 |
|
---|
8 | RENAME TABLE `articles` TO `Article` ;
|
---|
9 | ALTER TABLE `Article` ENGINE = InnoDB;
|
---|
10 |
|
---|
11 | ALTER TABLE `Article` ADD INDEX ( `Category` ) ;
|
---|
12 |
|
---|
13 | CREATE TABLE IF NOT EXISTS `ArticleCategory` (
|
---|
14 | `Id` int(11) NOT NULL auto_increment,
|
---|
15 | `Name` varchar(255) NOT NULL,
|
---|
16 | PRIMARY KEY (`Id`)
|
---|
17 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
---|
18 |
|
---|
19 | INSERT INTO `ArticleCategory` (`Id`, `Name`) VALUES
|
---|
20 | (1, 'Server novinky'),
|
---|
21 | (2, 'GM novinky'),
|
---|
22 | (3, 'In-game novinky'),
|
---|
23 | (4, 'Články');
|
---|
24 |
|
---|
25 | ALTER TABLE `Article` ADD FOREIGN KEY ( `Category` ) REFERENCES `ArticleCategory` (`Id`);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.