登陆is时显示越狱错误代码511的原因是什么

中国移动is出现错误码95_百度知道
中国移动is出现错误码95
您的回答被采纳后将获得:
系统奖励20(财富值+经验值)+难题奖励30(财富值+经验值)Linux编程中接收主函数返回值以及错误码提示_Linux编程_Linux公社-Linux系统门户网站
你好,游客
Linux编程中接收主函数返回值以及错误码提示
来源:Linux社区&
作者:Lyush
程序A创建子进程,并调用进程B,根据不调用的不同情况,最后显示结果不同。
#include &stdio.h&#include &unistd.h&#include &sys/wait.h&#include &sys/types.h&#include &errno.h&
int main() {& & pid_t pid,& && & if ((pid = fork()) & 0) {& & & & perror("fork failue.");& & }& & printf("pid = %d\n", pid); // 打印子父进程的获得的返回值& & if (pid == 0) {& & & & int x = execl("./test123", "./test", NULL);& & & & printf("x = %d\n", x); // execl调用失败返回-1& & & & perror("execl failue"); // 直接使用perror函数输出错误字符串(相比数字,字符串更容易理解)& & & & printf("%s\n", strerror(errno)); // 间接使用strerror输出错误字符串& & } else {& & & & rpid = waitpid(-1, &stat, 0); // 等待任意子进程结束& & & & if (WIFEXITED(stat)) { // 状态字拥有24位,一些宏函数对状态字进行解释& & & & & & printf("rpid = %d, stat = %d\n", rpid, WEXITSTATUS(stat));& & & & }& & }& & return 0;}
#include &stdio.h&
int main(int argc, char **argv) {& & printf("hello world.\n");& & exit(0x3244); // return与exit均能正常返回,返回值为 int & 0xff}
调用成功后:
liuxu@kylin:~/projects/webserver$ ./ptestpid = 4723pid = 0hello world.rpid = 4723, stat = 68
调用失败后:
liuxu@kylin:~/projects/webserver$ ./ptestpid = 4738pid = 0x = -1execl failue: No such file or directoryNo such file or directoryrpid = 4738, stat = 0
PS:error码含义
errno.00 is: Success& & 成功errno.01 is: Operation not permitted& & & &
不允许此类操作errno.02 is: No such file or directory& & & &
没有此文件或目录errno.03 is: No such process& & & & & & & & & & 没有此进程errno.04 is: Interrupted system call& & & & &
中断系统调用errno.05 is: Input/output error& & & & & & & & &
输入输出错误errno.06 is: No such device or address& & 没有此设备或地址errno.07 is: Argument list too long& & & & & & 参数过长errno.08 is: Exec format error& & & & & & & & &
执行格式错误errno.09 is: Bad file descriptor& & & & & & & & & 无效的文件描述符errno.10 is: No child processes& & & & & & & &
不存在子进程errno.11 is: Resource temporarily unavailable&
资源暂时不可用errno.12 is: Cannot allocate memory& & & &
分配内存失败errno.13 is: Permission denied& & & & & & & & &
权限错误errno.14 is: Bad address& & & & & & & & & & & & &
地址错误errno.15 is: Block device required& & & & & &
块设备请求errno.16 is: Device or resource busy& & & &
设备或资源忙errno.17 is: File exists& & & & & & & & & & & & & & & & 文件已经存在errno.18 is: Invalid cross-device link& & & & & 无效的交叉连接设备errno.19 is: No such device& & & & & & & & & & &
没有此设备errno.20 is: Not a directory& & & & & & & & & & & & 不是一个目录errno.21 is: Is a directory& & & & & & & & & & & & &
是一个目录errno.22 is: Invalid argument& & & & & & & & & &
参数非法errno.23 is: Too many open files in system& & 系统打开文件太多errno.24 is: Too many open files& & & & & & &
打开文件太多errno.25 is: Inappropriate ioctl for device& & & & & 设备部支持该操作errno.26 is: Text file busy& & & & & & & & & & & & &
文本文件忙errno.27 is: File too large& & & & & & & & & & & & &
文件太大errno.28 is: No space left on device& & & & & & 设备没有空间,一般为存储设备errno.29 is: Illegal seek& & & & & & & & & & & & & & &
非法的seek操作errno.30 is: Read-only file system& & & & & & &
只读文件系统errno.31 is: Too many links& & & & & & & & & & & &
太多连接errno.32 is: Broken pipe& & & & & & & & & & & & & & & 管道破裂errno.33 is: Numerical argument out of domain& & & & & 数值参数超出取值范围errno.34 is: Numerical result out of range& & & & & & & & & 数值结果超出取值范围errno.35 is: Resource deadlock avoided& & & & & & & & &
资源死锁errno.36 is: File name too long& & & & & & & & & & & & 文件名太长errno.37 is: No locks available& & & & & & & & & & & &
没有可用的锁errno.38 is: Function not implemented& & & & & & 函数没有执行errno.39 is: Directory not empty& & & & & & & & & & & 目录非空errno.40 is: Too many levels of symbolic links 太多级符号连接errno.41 is: Unknown error 41& & & & & & & & & & & &
41未知错误errno.42 is: No message of desired type& & & &
不被接受的消息类型errno.43 is: Identifier removed& & & & & & & & & & & & 标识符已被删除errno.44 is: Channel number out of range& &
。。。errno.45 is: Level 2 not synchronizederrno.46 is: Level 3 haltederrno.47 is: Level 3 reseterrno.48 is: Link number out of rangeerrno.49 is: Protocol driver not attachederrno.50 is: No CSI structure availableerrno.51 is: Level 2 haltederrno.52 is: Invalid exchangeerrno.53 is: Invalid request descriptorerrno.54 is: Exchange fullerrno.55 is: No anodeerrno.56 is: Invalid request codeerrno.57 is: Invalid sloterrno.58 is: Unknown error 58errno.59 is: Bad font file formaterrno.60 is: Device not a streamerrno.61 is: No data availableerrno.62 is: Timer expirederrno.63 is: Out of streams resourceserrno.64 is: Machine is not on the networkerrno.65 is: Package not installederrno.66 is: Object is remoteerrno.67 is: Link has been severederrno.68 is: Advertise errorerrno.69 is: Srmount errorerrno.70 is: Communication error on senderrno.71 is: Protocol errorerrno.72 is: Multihop attemptederrno.73 is: RFS specific errorerrno.74 is: Bad messageerrno.75 is: Value too large for defined data typeerrno.76 is: Name not unique on networkerrno.77 is: File descriptor in bad stateerrno.78 is: Remote address changederrno.79 is: Can not access a needed shared libraryerrno.80 is: Accessing a corrupted shared libraryerrno.81 is: .lib secion in a.out corruptederrno.82 is: Attempting to link in too many shared librarieserrno.83 is: Cannot exec a shared library directlyerrno.84 is: Invalid or incomplete multibyte or wide charactererrno.85 is: Interrupted system call should be restartederrno.86 is: Streams pipe errorerrno.87 is: Too many userserrno.88 is: Socket operation on non-socketerrno.89 is: Destination address requirederrno.90 is: Message too longerrno.91 is: Protocol wrong type for socketerrno.92 is: Protocol not availableerrno.93 is: Protocol not supportederrno.94 is: Socket type not supportederrno.95 is: Operation not supportederrno.96 is: Protocol family not supportederrno.97 is: Address family not supported by protocolerrno.98 is: Address already in useerrno.99 is: Cannot assign requested addresserrno.100 is: Network is downerrno.101 is: Network is unreachableerrno.102 is: Network dropped connection on reseterrno.103 is: Software caused connection aborterrno.104 is: Connection reset by peererrno.105 is: No buffer space availableerrno.106 is: Transport endpoint is already connectederrno.107 is: Transport endpoint is not connectederrno.108 is: Cannot send after transport endpoint shutdownerrno.109 is: Too many references: cannot spliceerrno.110 is: Connection timed outerrno.111 is: Connection refusederrno.112 is: Host is downerrno.113 is: No route to hosterrno.114 is: Operation already in progresserrno.115 is: Operation now in progresserrno.116 is: Stale NFS file handleerrno.117 is: Structure needs cleaningerrno.118 is: Not a XENIX named type fileerrno.119 is: No XENIX semaphores availableerrno.120 is: Is a named type fileerrno.121 is: Remote I/O errorerrno.122 is: Disk quota exceedederrno.123 is: No medium founderrno.124 is: Wrong medium typeerrno.125 is: Operation cancelederrno.126 is: Required key not availableerrno.127 is: Key has expirederrno.128 is: Key has been revokederrno.129 is: Key was rejected by serviceerrno.130 is: Owner diederrno.131 is: State not recoverableerrno.132 is: Unknown error 132132-255全是Unknown error
本文永久更新链接地址:
相关资讯 & & &
& (11/20/:23)
& (06/21/:31)
& (12/17/:12)
& (06/21/:37)
& (06/17/:43)
图片资讯 & & &
   同意评论声明
   发表
尊重网上道德,遵守中华人民共和国的各项有关法律法规
承担一切因您的行为而直接或间接导致的民事或刑事法律责任
本站管理人员有权保留或删除其管辖留言中的任意内容
本站有权在网站内转载或引用您的评论
参与本评论即表明您已经阅读并接受上述条款
linux_fyp 发表于 楼主你好,我在测试过程中发生了0x51的Level 2 halted的错误,这是什么原因引起的呢?有人run起来本站的代码吗?本地build时报错,是我本地依赖问题,还是代码本身测试没有过就直接提上来了? - Go友团
01:39:51 [INFO] Start building...
# wetalk/modules/attachment
modules/attachment/qiniu_storage.go:68: m.Token undefined (type *models.Image has no field or method Token)
modules/attachment/qiniu_storage.go:73: m.Token undefined (type *models.Image has no field or method Token)
modules/attachment/qiniu_storage.go:81: undefined: &#/beego/wetalk/modules/utils".GetQiniuUptoken
modules/attachment/storage.go:87: m.Token undefined (type *models.Image has no field or method Token)
01:39:52 [ERRO] ============== Build failed ===================
vim打开两个go文件,改了一下。
重新bee run,这回感觉是没有办法改了。
01:44:53 [INFO] Start building...
# wetalk/modules/auth
modules/auth/auth.go:112: user.AvatarType undefined (type *models.User has no field or method AvatarType)
modules/auth/auth.go:112: undefined: setting.AvatarTypeGravatar
modules/auth/auth.go:125: user.AvatarType undefined (type *models.User has no field or method AvatarType)
modules/auth/auth.go:380: undefined: setting.AvatarImageMaxLength
modules/auth/auth.go:390: undefined: &#/beego/wetalk/modules/utils".GetQiniuUptoken
modules/auth/auth.go:402: user.AvatarKey undefined (type *models.User has no field or method AvatarKey)
modules/auth/form.go:275: undefined: setting.AvatarTypeGravatar
modules/auth/form.go:276: undefined: setting.AvatarTypePersonalized
01:44:53 [ERRO] ============== Build failed ===================
哪位大侠有run起来的,还请帮忙看看,谢过。
我run起来了,
thank you, wetalk is running
mv之后 bee run报了一个
20:24:05 [INFO] Start building...
../../qiniu/api/auth/digest/digest_auth.go:11:2: cannot find package &#/qiniu/bytes/seekable" in any of:
/usr/local/Cellar/go/1.4/libexec//qiniu/bytes/seekable (from $GOROOT)
/Users/jiangming/work/golang//qiniu/bytes/seekable (from $GOPATH)
20:24:05 [ERRO] ============== Build failed ===================
go get -/qiniu/bytes
重新bee run
20:27:04 [INFO] Start building...
20:27:11 [SUCC] Build was successful
20:27:11 [INFO] Restarting wetalk ...
20:27:11 [INFO] ./wetalk is running...
20:27:11 [config.go:285] [W] open /Users/work/golang//beego/wetalk/conf/app.conf: no such file or directory
20:27:11 [conf.go:235] [E] Error 1101: BLOB/TEXT column 'data' can't have a default value
logs.BeeLogger.SetLogger: open logs/dev.log: no such file or directory
20:27:11 [wetalk.go:61] [I] AppPath: /Users/jiangming/work/golang//beego/wetalk
20:27:11 [wetalk.go:66] [I] Develment mode enabled
20:27:11 [wetalk.go:68] [I] WeTalk Community 1.3.0.0 http://localhost:9090/
20:27:11 [app.go:103] [I] http server Running on :9090
20:27:29 [orm_helper.go:33] [E] models.CountObjects
Error 1146: Table 'wetalk.post' doesn't exist
20:27:29 [orm_helper.go:42] [E] models.ListObjects
Error 1146: Table 'wetalk.post' doesn't exist
20:27:29 [orm_helper.go:42] [E] models.ListObjects
Error 1146: Table 'wetalk.post' doesn't exist
20:27:29 [orm_helper.go:42] [E] models.ListObjects
Error 1146: Table 'wetalk.post' doesn't exist
20:27:29 [orm_helper.go:42] [E] models.ListObjects
Error 1146: Table 'wetalk.bulletin' doesn't exist
20:27:29 [router.go:845] [D] | GET
| 217.98023ms
哈,算是跑起来了,但是觉得还是不完美。
请问一下,这个站的数据库初始化文件在哪里呢?
run起来之后,去数据库看是空的
mysql& use wetalk
Database changed
Empty set (0.00 sec)
在论坛里面翻了翻,发现这个应该是和我一样的问题,求解答。
#4 @jmone 你没有使用orm sync来创建表结构。用beego的orm sync。
#4 @jmone 这是beego导致的坑,在1.4.2 升级到1.4.3的时候就有这个问题。不能怪框架,自己(我自己)水平也不行。原先Content
orm:"type(text)"改为Content
orm:"type(text);null"。把里面所有的都改掉
#5 @jemygraw 使用了,没有成功,表没有创建
#5 @jemygraw
谢谢两位,两三年没有碰golang了,新框架不了解所致。
最近好奇golang又翻出来看看,看到这个代码想搭起来看看。
昨天晚上看了一下beego的部分文档,orm sync了一下,部分表创建成功了(建表SQL写的比较任性,本地环境可能比较严格,部分SQL报错),有时间了再看看。
./wetalk orm syncdb -v
create table `user_social`
-- --------------------------------------------------
Table Structure for `/beego/social-auth.UserSocial`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `user_social` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`uid` integer NOT NULL DEFAULT '0' ,
`identify` varchar(200) NOT NULL DEFAULT '' ,
`type` integer NOT NULL DEFAULT '0' ,
`data` longtext NOT NULL DEFAULT '' ,
UNIQUE (`identify`, `type`)
) ENGINE=InnoDB;
Error 1101: BLOB/TEXT column 'data' can't have a default value
CREATE INDEX `user_social_uid` ON `user_social` (`uid`);
Error 1146: Table 'wetalk.user_social' doesn't exist
CREATE INDEX `user_social_type` ON `user_social` (`type`);
Error 1146: Table 'wetalk.user_social' doesn't exist
table `image` already exists, skip
create table `setting`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Setting`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `setting` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`name` varchar(100) NOT NULL DEFAULT ''
`value` longtext NOT NULL DEFAULT '' ,
`updated` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB;
Error 1101: BLOB/TEXT column 'value' can't have a default value
table `user` already exists, skip
table `follow` already exists, skip
table `bulletin` already exists, skip
create table `notification`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Notification`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `notification` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`from_user_id` integer NOT NULL,
`to_user_id` integer NOT NULL,
`action` integer NOT NULL DEFAULT '0' ,
`floor` integer NOT NULL DEFAULT '0' ,
`lang` integer NOT NULL DEFAULT '0' ,
`target_id` integer NOT NULL DEFAULT '0' ,
`title` varchar(60) NOT NULL DEFAULT '' ,
`uri` varchar(20) NOT NULL DEFAULT '' ,
`content` longtext NOT NULL DEFAULT '' ,
`content_cache` longtext NOT NULL DEFAULT '' ,
`status` integer NOT NULL DEFAULT '0' ,
`created` datetime NOT NULL
) ENGINE=InnoDB;
Error 1101: BLOB/TEXT column 'content' can't have a default value
CREATE INDEX `notification_status` ON `notification` (`status`);
Error 1146: Table 'wetalk.notification' doesn't exist
create table `page`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Page`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `page` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`user_id` integer NOT NULL,
`uri` varchar(60) NOT NULL DEFAULT '' ,
`title` varchar(60) NOT NULL DEFAULT '' ,
`content` longtext NOT NULL DEFAULT '' ,
`content_cache` longtext NOT NULL DEFAULT '' ,
`last_author_id` integer,
`is_publish` bool NOT NULL DEFAULT '0' ,
`created` datetime NOT NULL,
`updated` datetime NOT NULL
) ENGINE=InnoDB;
Error 1101: BLOB/TEXT column 'content' can't have a default value
CREATE INDEX `page_is_publish` ON `page` (`is_publish`);
Error 1146: Table 'wetalk.page' doesn't exist
create table `post`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Post`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `post` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`user_id` integer NOT NULL,
`title` varchar(60) NOT NULL DEFAULT '' ,
`content` longtext NOT NULL DEFAULT '' ,
`content_cache` longtext NOT NULL DEFAULT '' ,
`browsers` integer NOT NULL DEFAULT '0' ,
`replys` integer NOT NULL DEFAULT '0' ,
`favorites` integer NOT NULL DEFAULT '0' ,
`last_reply_id` integer,
`last_author_id` integer,
`topic_id` integer NOT NULL,
`lang` integer NOT NULL DEFAULT '0' ,
`is_best` bool NOT NULL DEFAULT '0' ,
`can_edit` bool NOT NULL DEFAULT '0' ,
`category_id` integer NOT NULL,
`created` datetime NOT NULL,
`updated` datetime NOT NULL,
`last_replied` datetime
) ENGINE=InnoDB;
Error 1101: BLOB/TEXT column 'content' can't have a default value
CREATE INDEX `post_browsers` ON `post` (`browsers`);
Error 1146: Table 'wetalk.post' doesn't exist
CREATE INDEX `post_replys` ON `post` (`replys`);
Error 1146: Table 'wetalk.post' doesn't exist
CREATE INDEX `post_favorites` ON `post` (`favorites`);
Error 1146: Table 'wetalk.post' doesn't exist
CREATE INDEX `post_lang` ON `post` (`lang`);
Error 1146: Table 'wetalk.post' doesn't exist
CREATE INDEX `post_is_best` ON `post` (`is_best`);
Error 1146: Table 'wetalk.post' doesn't exist
CREATE INDEX `post_can_edit` ON `post` (`can_edit`);
Error 1146: Table 'wetalk.post' doesn't exist
CREATE INDEX `post_updated` ON `post` (`updated`);
Error 1146: Table 'wetalk.post' doesn't exist
table `favorite_post` already exists, skip
create table `comment`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/ment`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `comment` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`user_id` integer NOT NULL,
`post_id` integer NOT NULL,
`message` longtext NOT NULL DEFAULT '' ,
`message_cache` longtext NOT NULL DEFAULT '' ,
`floor` integer NOT NULL DEFAULT '0' ,
`status` integer NOT NULL DEFAULT '0' ,
`created` datetime NOT NULL
) ENGINE=InnoDB;
Error 1101: BLOB/TEXT column 'message' can't have a default value
CREATE INDEX `comment_status` ON `comment` (`status`);
Error 1146: Table &#ment' doesn't exist
CREATE INDEX `comment_created` ON `comment` (`created`);
Error 1146: Table &#ment' doesn't exist
create table `topic`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Topic`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `topic` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`name` varchar(30) NOT NULL DEFAULT ''
`intro` longtext NOT NULL DEFAULT '' ,
`image_link` varchar(200),
`slug` varchar(100) NOT NULL DEFAULT ''
`followers` integer NOT NULL DEFAULT '0' ,
`order` integer NOT NULL DEFAULT '0' ,
`created` datetime NOT NULL,
`updated` datetime NOT NULL,
`category_id` integer NOT NULL
) ENGINE=InnoDB;
Error 1101: BLOB/TEXT column 'intro' can't have a default value
CREATE INDEX `topic_followers` ON `topic` (`followers`);
Error 1146: Table 'wetalk.topic' doesn't exist
CREATE INDEX `topic_order` ON `topic` (`order`);
Error 1146: Table 'wetalk.topic' doesn't exist
CREATE INDEX `topic_updated` ON `topic` (`updated`);
Error 1146: Table 'wetalk.topic' doesn't exist
table `category` already exists, skip
table `follow_topic` already exists, skip
#5 @jemygraw
回帖好像不能编辑,2#里面带了个人信息,有什么办法去掉呢?
太乱了 从来就没成功运行起来
#5 @jemygraw
C:/Go/bin/go.exe build
[E:/wgo//beego/wetalk]
成功: 进程退出代码 0.
[E:/wgo//beego/wetalk/conf/global]
错误: 进程无法启动.
不好意思,我这里出的是这个bug
还有不是beego下的wetalk 和你这里的wetalk都看晕了
#11 @tracyers 你应该找运行起来的问问,楼主可能遇不到我们遇到的问题,你把楼主的代码下载下载copy到../beego/wetalk目录下run
注意两点:
1、把项目放到beego目录下,如:golang//beego/wetalk
2、建数据库,执行下面代码,改app.ini 如:vim conf/global/app.ini 链接配置 如: data_source = root:passpword@tcp(127.0.0.1:3306)/wetalk?charset=utf8&loc=Asia%2FShanghai
create table `user_social`
-- --------------------------------------------------
Table Structure for `/beego/social-auth.UserSocial`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `user_social` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`uid` integer NOT NULL DEFAULT '0' ,
`identify` varchar(200) NOT NULL DEFAULT '' ,
`type` integer NOT NULL DEFAULT '0' ,
`data` longtext NOT NULL DEFAULT '' ,
UNIQUE (`identify`, `type`)
) ENGINE=InnoDB;
CREATE INDEX `user_social_uid` ON `user_social` (`uid`);
CREATE INDEX `user_social_type` ON `user_social` (`type`);
create table `image`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Image`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `image` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`user_id` integer NOT NULL,
`token` varchar(10) NOT NULL DEFAULT '' ,
`width` integer NOT NULL DEFAULT '0' ,
`height` integer NOT NULL DEFAULT '0' ,
`ext` integer NOT NULL DEFAULT '0' ,
`created` datetime NOT NULL
) ENGINE=InnoDB;
CREATE INDEX `image_ext` ON `image` (`ext`);
create table `setting`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Setting`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `setting` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`name` varchar(100) NOT NULL DEFAULT ''
`value` longtext NOT NULL DEFAULT '' ,
`updated` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB;
create table `user`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.User`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `user` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`user_name` varchar(30) NOT NULL DEFAULT ''
`nick_name` varchar(30) NOT NULL DEFAULT ''
`password` varchar(128) NOT NULL DEFAULT '' ,
`avatar_type` integer NOT NULL DEFAULT '1' ,
`avatar_key` varchar(50) NOT NULL DEFAULT '' ,
`url` varchar(100) NOT NULL DEFAULT '' ,
`company` varchar(30) NOT NULL DEFAULT '' ,
`location` varchar(30) NOT NULL DEFAULT '' ,
`email` varchar(80) NOT NULL DEFAULT ''
`gr_email` varchar(32) NOT NULL DEFAULT '' ,
`info` varchar(255) NOT NULL DEFAULT '' ,
`github` varchar(30) NOT NULL DEFAULT '' ,
`twitter` varchar(30) NOT NULL DEFAULT '' ,
`google` varchar(30) NOT NULL DEFAULT '' ,
`weibo` varchar(30) NOT NULL DEFAULT '' ,
`linkedin` varchar(30) NOT NULL DEFAULT '' ,
`facebook` varchar(30) NOT NULL DEFAULT '' ,
`public_email` bool NOT NULL DEFAULT '0' ,
`followers` integer NOT NULL DEFAULT '0' ,
`following` integer NOT NULL DEFAULT '0' ,
`fav_posts` integer NOT NULL DEFAULT '0' ,
`fav_topics` integer NOT NULL DEFAULT '0' ,
`is_admin` bool NOT NULL DEFAULT '0' ,
`is_active` bool NOT NULL DEFAULT '0' ,
`is_forbid` bool NOT NULL DEFAULT '0' ,
`lang` integer NOT NULL DEFAULT '0' ,
`rands` varchar(10) NOT NULL DEFAULT '' ,
`created` datetime NOT NULL,
`updated` datetime NOT NULL
) ENGINE=InnoDB;
CREATE INDEX `user_is_admin` ON `user` (`is_admin`);
CREATE INDEX `user_is_active` ON `user` (`is_active`);
CREATE INDEX `user_is_forbid` ON `user` (`is_forbid`);
CREATE INDEX `user_lang` ON `user` (`lang`);
create table `follow`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Follow`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `follow` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`user_id` integer NOT NULL,
`follow_user_id` integer NOT NULL,
`mutual` bool NOT NULL DEFAULT '0' ,
`created` datetime NOT NULL,
UNIQUE (`user_id`, `follow_user_id`)
) ENGINE=InnoDB;
create table `bulletin`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Bulletin`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `bulletin` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`name` varchar(255) NOT NULL DEFAULT '' ,
`url` varchar(255) NOT NULL DEFAULT '' ,
`type` integer NOT NULL DEFAULT '0' ,
`created` datetime NOT NULL,
`updated` datetime NOT NULL
) ENGINE=InnoDB;
create table `notification`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Notification`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `notification` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`from_user_id` integer NOT NULL,
`to_user_id` integer NOT NULL,
`action` integer NOT NULL DEFAULT '0' ,
`floor` integer NOT NULL DEFAULT '0' ,
`lang` integer NOT NULL DEFAULT '0' ,
`target_id` integer NOT NULL DEFAULT '0' ,
`title` varchar(60) NOT NULL DEFAULT '' ,
`uri` varchar(20) NOT NULL DEFAULT '' ,
`content` longtext NOT NULL DEFAULT '' ,
`content_cache` longtext NOT NULL DEFAULT '' ,
`status` integer NOT NULL DEFAULT '0' ,
`created` datetime NOT NULL
) ENGINE=InnoDB;
CREATE INDEX `notification_status` ON `notification` (`status`);
create table `page`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Page`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `page` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`user_id` integer NOT NULL,
`uri` varchar(60) NOT NULL DEFAULT '' ,
`title` varchar(60) NOT NULL DEFAULT '' ,
`content` longtext NOT NULL DEFAULT '' ,
`content_cache` longtext NOT NULL DEFAULT '' ,
`last_author_id` integer,
`is_publish` bool NOT NULL DEFAULT '0' ,
`created` datetime NOT NULL,
`updated` datetime NOT NULL
) ENGINE=InnoDB;
CREATE INDEX `page_is_publish` ON `page` (`is_publish`);
create table `post`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Post`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `post` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`user_id` integer NOT NULL,
`title` varchar(60) NOT NULL DEFAULT '' ,
`content` longtext NOT NULL DEFAULT '' ,
`content_cache` longtext NOT NULL DEFAULT '' ,
`browsers` integer NOT NULL DEFAULT '0' ,
`replys` integer NOT NULL DEFAULT '0' ,
`favorites` integer NOT NULL DEFAULT '0' ,
`last_reply_id` integer,
`last_author_id` integer,
`topic_id` integer NOT NULL,
`lang` integer NOT NULL DEFAULT '0' ,
`is_best` bool NOT NULL DEFAULT '0' ,
`can_edit` bool NOT NULL DEFAULT '0' ,
`category_id` integer NOT NULL,
`created` datetime NOT NULL,
`updated` datetime NOT NULL,
`last_replied` datetime
) ENGINE=InnoDB;
CREATE INDEX `post_browsers` ON `post` (`browsers`);
CREATE INDEX `post_replys` ON `post` (`replys`);
CREATE INDEX `post_favorites` ON `post` (`favorites`);
CREATE INDEX `post_lang` ON `post` (`lang`);
CREATE INDEX `post_is_best` ON `post` (`is_best`);
CREATE INDEX `post_can_edit` ON `post` (`can_edit`);
CREATE INDEX `post_updated` ON `post` (`updated`);
create table `favorite_post`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.FavoritePost`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `favorite_post` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`user_id` integer NOT NULL,
`post_id` integer NOT NULL,
`is_fav` bool NOT NULL DEFAULT '0' ,
`created` datetime NOT NULL,
`updated` datetime NOT NULL,
UNIQUE (`user_id`, `post_id`)
) ENGINE=InnoDB;
create table `comment`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/ment`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `comment` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`user_id` integer NOT NULL,
`post_id` integer NOT NULL,
`message` longtext NOT NULL DEFAULT '' ,
`message_cache` longtext NOT NULL DEFAULT '' ,
`floor` integer NOT NULL DEFAULT '0' ,
`status` integer NOT NULL DEFAULT '0' ,
`created` datetime NOT NULL
) ENGINE=InnoDB;
CREATE INDEX `comment_status` ON `comment` (`status`);
CREATE INDEX `comment_created` ON `comment` (`created`);
create table `topic`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Topic`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `topic` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`name` varchar(30) NOT NULL DEFAULT ''
`intro` longtext NOT NULL DEFAULT '' ,
`image_link` varchar(200),
`slug` varchar(100) NOT NULL DEFAULT ''
`followers` integer NOT NULL DEFAULT '0' ,
`order` integer NOT NULL DEFAULT '0' ,
`created` datetime NOT NULL,
`updated` datetime NOT NULL,
`category_id` integer NOT NULL
) ENGINE=InnoDB;
CREATE INDEX `topic_followers` ON `topic` (`followers`);
CREATE INDEX `topic_order` ON `topic` (`order`);
CREATE INDEX `topic_updated` ON `topic` (`updated`);
create table `category`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.Category`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `category` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`name` varchar(30) NOT NULL DEFAULT ''
`slug` varchar(100) NOT NULL DEFAULT ''
`order` integer NOT NULL DEFAULT '0'
) ENGINE=InnoDB;
CREATE INDEX `category_order` ON `category` (`order`);
create table `follow_topic`
-- --------------------------------------------------
Table Structure for `/beego/wetalk/modules/models.FollowTopic`
-- --------------------------------------------------
CREATE TABLE IF NOT EXISTS `follow_topic` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`user_id` integer NOT NULL,
`topic_id` integer NOT NULL,
`created` datetime NOT NULL,
UNIQUE (`user_id`, `topic_id`)
) ENGINE=InnoDB;
是否有示例数据装载
#14 @youngjiandong 可以用 ./main orm syncdb 来创建表结构。
对,做了,只有表结构,没数据}

我要回帖

更多关于 优酷错误代码1000 51 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信