数据库建表语句备份
Posted 杨传伟
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了数据库建表语句备份相关的知识,希望对你有一定的参考价值。
团队项目movierankings数据库---8个数据表
1.movie1905
1 CREATE DATABASE /*!32312 IF NOT EXISTS*/`movierankings` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */; 2 3 USE `movierankings`; 4 5 /*Table structure for table `movie1905` */ 6 7 DROP TABLE IF EXISTS `movie1905`; 8 9 CREATE TABLE `movie1905` ( 10 `id` INT(11) NOT NULL AUTO_INCREMENT, 11 `name` VARCHAR(100) COLLATE utf8_bin NOT NULL, 12 `score` VARCHAR(45) COLLATE utf8_bin NOT NULL, 13 `path` VARCHAR(100) COLLATE utf8_bin NOT NULL, 14 `state` VARCHAR(30) COLLATE utf8_bin NOT NULL, 15 PRIMARY KEY (`name`), 16 KEY `id` (`id`) 17 ) ENGINE=INNODB AUTO_INCREMENT=13530 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
2.moviebean
1 DROP TABLE IF EXISTS `moviebean`; 2 3 CREATE TABLE `moviebean` ( 4 `id` INT(11) NOT NULL AUTO_INCREMENT, 5 `title` VARCHAR(45) COLLATE utf8_bin NOT NULL, 6 `star` TEXT COLLATE utf8_bin NOT NULL, 7 `director` TEXT COLLATE utf8_bin NOT NULL, 8 `type_movie` VARCHAR(45) COLLATE utf8_bin NOT NULL, 9 `area` VARCHAR(45) COLLATE utf8_bin NOT NULL, 10 `date_time` VARCHAR(45) COLLATE utf8_bin NOT NULL, 11 `summary` TEXT COLLATE utf8_bin NOT NULL, 12 `score` VARCHAR(45) COLLATE utf8_bin NOT NULL, 13 `language_movie` VARCHAR(45) COLLATE utf8_bin NOT NULL, 14 `img` TEXT COLLATE utf8_bin NOT NULL, 15 `scorenum` INT(11) NOT NULL, 16 `timelen` VARCHAR(45) COLLATE utf8_bin NOT NULL, 17 PRIMARY KEY (`id`,`title`,`scorenum`) 18 ) ENGINE=INNODB AUTO_INCREMENT=3157 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
3.movieimdb
1 DROP TABLE IF EXISTS `movieimdb`; 2 3 CREATE TABLE `movieimdb` ( 4 `id` INT(11) NOT NULL AUTO_INCREMENT, 5 `name` VARCHAR(100) COLLATE utf8_bin NOT NULL, 6 `score` VARCHAR(45) COLLATE utf8_bin NOT NULL, 7 PRIMARY KEY (`name`), 8 KEY `id` (`id`) 9 ) ENGINE=INNODB AUTO_INCREMENT=12483 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
4.movieiqy
1 DROP TABLE IF EXISTS `movieiqy`; 2 3 CREATE TABLE `movieiqy` ( 4 `id` INT(11) NOT NULL AUTO_INCREMENT, 5 `name` VARCHAR(45) COLLATE utf8_bin NOT NULL, 6 `score` VARCHAR(45) COLLATE utf8_bin NOT NULL, 7 `path` VARCHAR(45) COLLATE utf8_bin NOT NULL, 8 `state` VARCHAR(45) COLLATE utf8_bin NOT NULL, 9 PRIMARY KEY (`name`), 10 KEY `id` (`id`) 11 ) ENGINE=INNODB AUTO_INCREMENT=14350 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
5.moviesohu
1 DROP TABLE IF EXISTS `moviesohu`; 2 3 CREATE TABLE `moviesohu` ( 4 `id` INT(11) NOT NULL AUTO_INCREMENT, 5 `name` VARCHAR(45) COLLATE utf8_bin NOT NULL, 6 `score` VARCHAR(45) COLLATE utf8_bin NOT NULL, 7 `path` VARCHAR(100) COLLATE utf8_bin NOT NULL, 8 `state` VARCHAR(10) COLLATE utf8_bin NOT NULL, 9 PRIMARY KEY (`name`), 10 KEY `id` (`id`) 11 ) ENGINE=INNODB AUTO_INCREMENT=3654 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
6.movieten
1 DROP TABLE IF EXISTS `movieten`; 2 3 CREATE TABLE `movieten` ( 4 `id` INT(11) NOT NULL AUTO_INCREMENT, 5 `name` VARCHAR(45) COLLATE utf8_bin NOT NULL, 6 `score` VARCHAR(45) COLLATE utf8_bin NOT NULL, 7 `path` VARCHAR(45) COLLATE utf8_bin NOT NULL, 8 `state` VARCHAR(45) COLLATE utf8_bin NOT NULL, 9 PRIMARY KEY (`name`), 10 KEY `id` (`id`) 11 ) ENGINE=INNODB AUTO_INCREMENT=20037 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
7.userdata
1 DROP TABLE IF EXISTS `userdata`; 2 3 CREATE TABLE `userdata` ( 4 `userphone` VARCHAR(20) COLLATE utf8_bin NOT NULL, 5 `userpass` VARCHAR(45) COLLATE utf8_bin NOT NULL, 6 `useremail` VARCHAR(100) COLLATE utf8_bin NOT NULL, 7 `username` VARCHAR(45) COLLATE utf8_bin NOT NULL, 8 PRIMARY KEY (`userphone`) 9 ) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
8.userlike
1 DROP TABLE IF EXISTS `userlike`; 2 3 CREATE TABLE `userlike` ( 4 `id` INT(11) NOT NULL AUTO_INCREMENT, 5 `userphone` VARCHAR(45) COLLATE utf8_bin NOT NULL, 6 `usermovie` VARCHAR(45) COLLATE utf8_bin NOT NULL, 7 `usertype` VARCHAR(45) COLLATE utf8_bin NOT NULL, 8 `scorenum` INT(11) NOT NULL, 9 `url` TEXT COLLATE utf8_bin NOT NULL, 10 `score` VARCHAR(45) COLLATE utf8_bin NOT NULL, 11 PRIMARY KEY (`id`,`userphone`,`usermovie`,`usertype`,`scorenum`) 12 ) ENGINE=INNODB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
以上是关于数据库建表语句备份的主要内容,如果未能解决你的问题,请参考以下文章
《游戏系统设计二》操蛋,游戏版本要回滚,还好我机智备份了数据库,代码直接拿走
《游戏系统设计二》操蛋,游戏版本要回滚,还好我机智备份了数据库,代码直接拿走