控制台应用,yzncms本身基于tp5.1框架,里面的队列用不了,bug,坑
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

install.sql 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. CREATE TABLE IF NOT EXISTS `__PREFIX__category` (
  2. `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT '栏目ID',
  3. `catname` varchar(30) NOT NULL DEFAULT '' COMMENT '栏目名称',
  4. `catdir` varchar(30) NOT NULL DEFAULT '' COMMENT '唯一标识',
  5. `type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '类别',
  6. `modelid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '模型ID',
  7. `parentid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '父ID',
  8. `arrparentid` varchar(255) NOT NULL DEFAULT '' COMMENT '所有父ID',
  9. `arrchildid` mediumtext COMMENT '所有子栏目ID',
  10. `child` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否存在子栏目,1存在',
  11. `image` varchar(255) NOT NULL DEFAULT '' COMMENT '栏目图片',
  12. `icon` varchar(255) NOT NULL DEFAULT '' COMMENT '栏目图标',
  13. `description` mediumtext NOT NULL COMMENT '栏目描述',
  14. `url` varchar(100) NOT NULL DEFAULT '' COMMENT '链接地址',
  15. `items` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '文档数量',
  16. `setting` text COMMENT '相关配置信息',
  17. `listorder` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  18. `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '状态',
  19. PRIMARY KEY (`id`),
  20. UNIQUE KEY `catdir` (`catdir`),
  21. KEY `parentid` (`parentid`)
  22. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='栏目表';
  23. CREATE TABLE IF NOT EXISTS `__PREFIX__category_priv` (
  24. `catid` smallint(5) unsigned NOT NULL DEFAULT '0',
  25. `roleid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '角色或者组ID',
  26. `is_admin` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否为管理员 1、管理员',
  27. `action` varchar(30) NOT NULL DEFAULT '' COMMENT '动作',
  28. KEY `catid` (`catid`,`roleid`,`is_admin`,`action`)
  29. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='栏目权限表';
  30. CREATE TABLE IF NOT EXISTS `__PREFIX__page` (
  31. `catid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '栏目ID',
  32. `title` varchar(160) NOT NULL DEFAULT '' COMMENT '标题',
  33. `keywords` varchar(255) NOT NULL DEFAULT '' COMMENT '关键字',
  34. `description` varchar(255) NOT NULL DEFAULT '' COMMENT 'SEO描述',
  35. `content` text COMMENT '内容',
  36. `thumb` varchar(255) NOT NULL DEFAULT '' COMMENT '缩略图',
  37. `hits` mediumint(8) unsigned DEFAULT '0' COMMENT '点击量',
  38. `create_time` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  39. `update_time` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
  40. PRIMARY KEY (`catid`)
  41. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='单页内容表';
  42. CREATE TABLE IF NOT EXISTS `__PREFIX__tags` (
  43. `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'tagID',
  44. `tag` varchar(20) NOT NULL DEFAULT '' COMMENT 'tag名称',
  45. `seo_title` varchar(255) NOT NULL DEFAULT '' COMMENT 'seo标题',
  46. `seo_keyword` varchar(255) NOT NULL DEFAULT '' COMMENT 'seo关键字',
  47. `seo_description` varchar(255) NOT NULL DEFAULT '' COMMENT 'seo简介',
  48. `usetimes` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '信息总数',
  49. `hits` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '点击数',
  50. `create_time` int(10) unsigned DEFAULT NULL COMMENT '添加时间',
  51. `update_time` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
  52. `listorder` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  53. PRIMARY KEY (`id`),
  54. UNIQUE KEY `tag` (`tag`),
  55. KEY `usetimes` (`usetimes`,`listorder`),
  56. KEY `hits` (`hits`,`listorder`)
  57. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='tags主表';
  58. CREATE TABLE IF NOT EXISTS `__PREFIX__tags_content` (
  59. `tag` varchar(20) NOT NULL COMMENT 'tag名称',
  60. `modelid` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '模型ID',
  61. `contentid` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '信息ID',
  62. `catid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '栏目ID',
  63. `update_time` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
  64. KEY `modelid` (`modelid`,`contentid`),
  65. KEY `tag` (`tag`(10))
  66. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='tags数据表';
  67. CREATE TABLE IF NOT EXISTS `__PREFIX__cms_order` (
  68. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  69. `trade_sn` varchar(50) DEFAULT '' COMMENT '订单ID',
  70. `user_id` int(10) unsigned DEFAULT '0' COMMENT '会员ID',
  71. `contentid` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '信息ID',
  72. `catid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '栏目ID',
  73. `title` varchar(100) DEFAULT NULL COMMENT '订单标题',
  74. `type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1金钱or2点数',
  75. `total_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单总价',
  76. `pay_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际支付金额',
  77. `pay_type` varchar(50) DEFAULT NULL COMMENT '支付类型',
  78. `method` varchar(100) NULL DEFAULT '' COMMENT '支付方法',
  79. `ip` varchar(50) DEFAULT NULL COMMENT 'IP地址',
  80. `useragent` varchar(255) DEFAULT NULL COMMENT '用户访问端标识',
  81. `remark` varchar(255) NOT NULL COMMENT '备注说明',
  82. `pay_time` int(10) unsigned DEFAULT NULL COMMENT '支付时间',
  83. `create_time` int(10) unsigned DEFAULT NULL COMMENT '添加时间',
  84. `update_time` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
  85. `status` enum('succ','failed','error','cancel','unpay') NOT NULL DEFAULT 'unpay' COMMENT '状态',
  86. PRIMARY KEY (`id`),
  87. KEY `catid` (`catid`,`contentid`),
  88. KEY `trade_sn` (`trade_sn`)
  89. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='订单表';
  90. CREATE TABLE IF NOT EXISTS `__PREFIX__cms_content` (
  91. `id` int(10) NOT NULL AUTO_INCREMENT,
  92. `catid` smallint(5) NOT NULL COMMENT '栏目ID',
  93. `content_id` int(10) NOT NULL COMMENT '信息ID',
  94. `uid` mediumint(8) NOT NULL COMMENT '会员ID',
  95. `username` varchar(16) NOT NULL COMMENT '用户名',
  96. `create_time` int(10) unsigned DEFAULT NULL COMMENT '添加时间',
  97. `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态',
  98. PRIMARY KEY (`id`),
  99. KEY `uid` (`catid`,`content_id`,`status`)
  100. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='会员投稿信息记录表';
  101. -- 1.1.0 --
  102. ALTER TABLE `__PREFIX__category` ENGINE = InnoDB;
  103. ALTER TABLE `__PREFIX__category_priv` ENGINE = InnoDB;
  104. ALTER TABLE `__PREFIX__page` ENGINE = InnoDB;
  105. ALTER TABLE `__PREFIX__tags` ENGINE = InnoDB;
  106. ALTER TABLE `__PREFIX__tags_content` ENGINE = InnoDB;
  107. ALTER TABLE `__PREFIX__cms_order` ENGINE = InnoDB;
  108. ALTER TABLE `__PREFIX__cms_content` ENGINE = InnoDB;
  109. -- 1.1.2 --
  110. ALTER TABLE `__PREFIX__page` CHANGE COLUMN `inputtime` `create_time` int(10) unsigned DEFAULT NULL COMMENT '创建时间';
  111. ALTER TABLE `__PREFIX__page` CHANGE COLUMN `updatetime` `update_time` int(10) unsigned DEFAULT NULL COMMENT '更新时间';
  112. ALTER TABLE `__PREFIX__tags_content` CHANGE COLUMN `updatetime` `update_time` int(10) unsigned DEFAULT NULL COMMENT '更新时间';