Last change
on this file was 711, checked in by george, 15 years ago |
- Zkopírováno: Větev trunk do branches jako posledni.
|
File size:
890 bytes
|
Line | |
---|
1 | CREATE TABLE IF NOT EXISTS `File` (
|
---|
2 | `Id` int(11) NOT NULL AUTO_INCREMENT,
|
---|
3 | `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
|
---|
4 | `Location` varchar(255) COLLATE utf8_czech_ci NOT NULL,
|
---|
5 | `Time` datetime NOT NULL,
|
---|
6 | `Category` int(11) NOT NULL,
|
---|
7 | `Description` text COLLATE utf8_czech_ci NOT NULL,
|
---|
8 | PRIMARY KEY (`Id`),
|
---|
9 | KEY `Category` (`Category`)
|
---|
10 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=9 ;
|
---|
11 |
|
---|
12 |
|
---|
13 |
|
---|
14 | CREATE TABLE IF NOT EXISTS `FileCategory` (
|
---|
15 | `Id` int(11) NOT NULL AUTO_INCREMENT,
|
---|
16 | `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
|
---|
17 | PRIMARY KEY (`Id`)
|
---|
18 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=3 ;
|
---|
19 |
|
---|
20 |
|
---|
21 | INSERT INTO `FileCategory` (`Id`, `Name`) VALUES
|
---|
22 | (1, 'Herní klient WoW'),
|
---|
23 | (2, 'Čeština pro klienta');
|
---|
24 |
|
---|
25 |
|
---|
26 | ALTER TABLE `File`
|
---|
27 | ADD CONSTRAINT `File_ibfk_1` FOREIGN KEY (`Category`) REFERENCES `FileCategory` (`Id`);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.