forked from WWBN/AVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdateDb.v1.3.sql
30 lines (23 loc) · 1.15 KB
/
updateDb.v1.3.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
ALTER TABLE `users`
CHARACTER SET = utf8 , COLLATE = utf8_general_ci ;
ALTER TABLE `videos`
CHARACTER SET = utf8 , COLLATE = utf8_general_ci ,
CHANGE COLUMN `description` `description` TEXT NULL DEFAULT NULL ,
CHANGE COLUMN `filename` `filename` VARCHAR(255) NOT NULL ;
ALTER TABLE `comments`
CHARACTER SET = utf8 , COLLATE = utf8_general_ci ;
ALTER TABLE `categories`
CHARACTER SET = utf8 , COLLATE = utf8_general_ci ,
CHANGE COLUMN `created` `created` DATETIME NOT NULL DEFAULT now() ,
CHANGE COLUMN `modified` `modified` DATETIME NOT NULL DEFAULT now() ;
ALTER TABLE `configurations`
CHARACTER SET = utf8 , COLLATE = utf8_general_ci ,
CHANGE COLUMN `modified` `modified` DATETIME NOT NULL DEFAULT now() ,
CHANGE COLUMN `created` `created` DATETIME NOT NULL DEFAULT now() ;
UPDATE configurations SET version = '1.3', modified = now() WHERE id = 1;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;