1 | ALTER TABLE `MeetItem` ADD `Link` VARCHAR(255) NOT NULL AFTER `Location`;
|
---|
2 |
|
---|
3 | UPDATE `MeetItem` SET `Age`=0 WHERE `Age`="";
|
---|
4 | ALTER TABLE `MeetItem` CHANGE `Age` `Age` INT NULL DEFAULT NULL;
|
---|
5 | UPDATE `MeetItem` SET `Age`=NULL WHERE `Age`=0;
|
---|
6 | UPDATE `MeetItem` SET `Height`=0 WHERE `Height`="";
|
---|
7 | ALTER TABLE `MeetItem` CHANGE `Height` `Height` INT NULL DEFAULT NULL;
|
---|
8 | UPDATE `MeetItem` SET `Height`=NULL WHERE `Height`=0;
|
---|
9 | UPDATE `MeetItem` SET `Weight`=0 WHERE `Weight`="";
|
---|
10 | ALTER TABLE `MeetItem` CHANGE `Weight` `Weight` INT NULL DEFAULT NULL;
|
---|
11 | UPDATE `MeetItem` SET `Weight`=NULL WHERE `Weight`=0;
|
---|
12 |
|
---|
13 | ALTER TABLE `MeetItem` CHANGE `Date` `Time` DATETIME NOT NULL;
|
---|
14 |
|
---|
15 | ALTER TABLE `MeetItem` ADD `TimeImport` DATETIME NULL AFTER `Link`;
|
---|
16 |
|
---|
17 | -- rev 35
|
---|
18 | CREATE TABLE `Movie` (
|
---|
19 | `Id` int(11) NOT NULL,
|
---|
20 | `NameCz` varchar(255) NOT NULL,
|
---|
21 | `NameEn` varchar(255) NOT NULL,
|
---|
22 | `Year` int(11) NOT NULL,
|
---|
23 | `Imdb` varchar(255) NOT NULL,
|
---|
24 | `Csfd` varchar(255) NOT NULL
|
---|
25 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
---|
26 |
|
---|
27 | ALTER TABLE `Movie`
|
---|
28 | ADD PRIMARY KEY (`Id`),
|
---|
29 | ADD KEY `Year` (`Year`);
|
---|
30 |
|
---|
31 | ALTER TABLE `Movie`
|
---|
32 | MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
|
---|
33 |
|
---|
34 | CREATE TABLE `DanceFigure` (
|
---|
35 | `Id` int(11) NOT NULL,
|
---|
36 | `NameCz` varchar(255) NOT NULL,
|
---|
37 | `NameEn` varchar(255) NOT NULL,
|
---|
38 | `Dance` int(11) NOT NULL
|
---|
39 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
---|
40 |
|
---|
41 | ALTER TABLE `DanceFigure`
|
---|
42 | ADD PRIMARY KEY (`Id`),
|
---|
43 | ADD UNIQUE KEY `Id` (`Id`),
|
---|
44 | ADD KEY `Dance` (`Dance`);
|
---|
45 |
|
---|
46 | ALTER TABLE `DanceFigure`
|
---|
47 | MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT;
|
---|
48 |
|
---|
49 | ALTER TABLE `DanceFigure`
|
---|
50 | ADD CONSTRAINT `DanceFigure_ibfk_1` FOREIGN KEY (`Dance`) REFERENCES `Dance` (`Id`);
|
---|
51 |
|
---|
52 | ALTER TABLE `MeetItem`
|
---|
53 | ADD COLUMN `RemoteId` VARCHAR(255) NULL DEFAULT NULL AFTER `TimeImport`;
|
---|
54 |
|
---|
55 | -- rev 48
|
---|
56 | ALTER TABLE `MeetItem`
|
---|
57 | ADD COLUMN `Hidden` INT NULL DEFAULT '0' AFTER `RemoteId`;
|
---|
58 |
|
---|
59 | -- rev 51
|
---|
60 | CREATE TABLE IF NOT EXISTS `Event` (
|
---|
61 | `Id` int(11) NOT NULL AUTO_INCREMENT,
|
---|
62 | `TimeFrom` datetime DEFAULT NULL,
|
---|
63 | `TimeTo` datetime DEFAULT NULL,
|
---|
64 | `Source` int(11) DEFAULT NULL,
|
---|
65 | `Link` varchar(255) DEFAULT NULL,
|
---|
66 | `Hidden` int(11) DEFAULT 0,
|
---|
67 | `Description` text DEFAULT NULL,
|
---|
68 | `Title` varchar(255) DEFAULT NULL,
|
---|
69 | `Price` int(11) DEFAULT NULL,
|
---|
70 | `Location` varchar(255) DEFAULT NULL,
|
---|
71 | `TimeImport` datetime DEFAULT NULL,
|
---|
72 | `RemoteId` varchar(255) DEFAULT NULL,
|
---|
73 | PRIMARY KEY (`Id`),
|
---|
74 | KEY `Source` (`Source`)
|
---|
75 | ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4;
|
---|
76 |
|
---|
77 | CREATE TABLE IF NOT EXISTS `EventSource` (
|
---|
78 | `Id` int(11) NOT NULL AUTO_INCREMENT,
|
---|
79 | `Name` varchar(255) DEFAULT NULL,
|
---|
80 | `Method` varchar(255) DEFAULT NULL,
|
---|
81 | `URL` varchar(255) DEFAULT NULL,
|
---|
82 | PRIMARY KEY (`Id`)
|
---|
83 | ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
|
---|
84 |
|
---|
85 | ALTER TABLE `MeetSource` ADD `Enabled` int(11) NOT NULL DEFAULT 1;
|
---|
86 |
|
---|
87 | -- rev 65
|
---|
88 | ALTER TABLE `Dance` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
---|
89 | ALTER TABLE `DanceFigure` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
---|
90 | ALTER TABLE `DanceGroup` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
---|
91 | ALTER TABLE `Event` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
---|
92 | ALTER TABLE `EventSource` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
---|
93 | ALTER TABLE `MeetItem` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
---|
94 | ALTER TABLE `MeetSource` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
---|
95 | ALTER TABLE `Movie` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
---|
96 | ALTER TABLE `Music` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
---|
97 | ALTER TABLE `Resource` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
---|
98 | ALTER TABLE `ResourceGroup` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
---|
99 | ALTER TABLE `School` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
---|
100 |
|
---|
101 | -- rev 66
|
---|
102 | ALTER TABLE `MeetSource` ADD `InsertURL` VARCHAR(255) NOT NULL AFTER `Enabled`;
|
---|