2019-11-06 12:36:38 +08:00
|
|
|
ALTER TABLE `v2_server`
|
|
|
|
ADD `last_check_at` int(11) NULL AFTER `rate`;
|
2019-12-19 21:53:47 +08:00
|
|
|
|
2019-11-06 12:36:38 +08:00
|
|
|
ALTER TABLE `v2_server`
|
|
|
|
ADD `network` varchar(11) COLLATE 'utf8_general_ci' NOT NULL AFTER `rate`;
|
2019-12-19 21:53:47 +08:00
|
|
|
|
2019-11-06 12:36:38 +08:00
|
|
|
ALTER TABLE `v2_server`
|
2019-11-18 18:19:28 +08:00
|
|
|
ADD `settings` text COLLATE 'utf8_general_ci' NULL AFTER `network`;
|
2019-12-19 21:53:47 +08:00
|
|
|
|
2019-11-18 18:19:28 +08:00
|
|
|
ALTER TABLE `v2_server`
|
2019-11-23 22:25:06 +08:00
|
|
|
ADD `show` tinyint(1) NOT NULL DEFAULT '0' AFTER `settings`;
|
2019-12-19 21:53:47 +08:00
|
|
|
|
2019-11-23 22:25:06 +08:00
|
|
|
ALTER TABLE `v2_user`
|
2019-11-25 22:12:53 +08:00
|
|
|
CHANGE `enable` `enable` tinyint(1) NOT NULL DEFAULT '1' AFTER `transfer_enable`;
|
2019-12-19 21:53:47 +08:00
|
|
|
|
2019-11-25 22:12:53 +08:00
|
|
|
ALTER TABLE `v2_order`
|
2019-11-27 19:55:53 +08:00
|
|
|
ADD `type` int(11) NOT NULL COMMENT '1新购2续费3升级' AFTER `plan_id`;
|
2019-12-19 21:53:47 +08:00
|
|
|
|
2019-11-27 19:55:53 +08:00
|
|
|
ALTER TABLE `v2_user`
|
2019-11-29 01:16:15 +08:00
|
|
|
ADD `commission_rate` int(11) NULL AFTER `password`;
|
2019-12-19 21:53:47 +08:00
|
|
|
|
2019-11-29 01:16:15 +08:00
|
|
|
ALTER TABLE `v2_user`
|
2019-12-12 13:45:46 +08:00
|
|
|
ADD `balance` int(11) NOT NULL DEFAULT '0' AFTER `password`;
|
|
|
|
|
|
|
|
CREATE TABLE `v2_notice` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
|
|
|
`title` varchar(255) NOT NULL,
|
|
|
|
`content` text NOT NULL,
|
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL
|
2019-12-13 17:07:46 +08:00
|
|
|
);
|
|
|
|
|
2019-12-13 17:40:00 +08:00
|
|
|
ALTER TABLE `v2_notice`
|
|
|
|
ADD `img_url` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `content`;
|
|
|
|
|
2019-12-13 17:07:46 +08:00
|
|
|
CREATE TABLE `v2_ticket` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`user_id` int(11) NOT NULL,
|
|
|
|
`subject` varchar(255) NOT NULL,
|
|
|
|
`level` tinyint(1) NOT NULL,
|
|
|
|
`status` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
CREATE TABLE `v2_ticket_message` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`user_id` int(11) NOT NULL,
|
|
|
|
`ticket_id` int(11) NOT NULL,
|
|
|
|
`message` varchar(255) NOT NULL,
|
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
ALTER TABLE `v2_ticket`
|
2019-12-13 17:29:55 +08:00
|
|
|
ADD `last_reply_user_id` int(11) NOT NULL AFTER `user_id`;
|
2019-12-19 22:22:31 +08:00
|
|
|
|
|
|
|
ALTER TABLE `v2_user`
|
2019-12-22 23:45:05 +08:00
|
|
|
CHANGE `last_login_at` `last_login_at` int(11) NULL AFTER `is_admin`;
|
|
|
|
|
|
|
|
ALTER TABLE `v2_server_log`
|
|
|
|
CHANGE `node_id` `server_id` int(11) NOT NULL AFTER `user_id`,
|
|
|
|
CHANGE `u` `u` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `server_id`,
|
|
|
|
CHANGE `d` `d` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `u`,
|
2019-12-23 16:23:55 +08:00
|
|
|
CHANGE `rate` `rate` int(11) NOT NULL AFTER `d`;
|
|
|
|
|
|
|
|
ALTER TABLE `v2_server`
|
2019-12-27 15:14:49 +08:00
|
|
|
DROP `last_check_at`;
|
|
|
|
|
|
|
|
ALTER TABLE `v2_server`
|
2019-12-27 18:01:19 +08:00
|
|
|
CHANGE `name` `name` varchar(255) COLLATE 'utf8mb4_general_ci' NOT NULL AFTER `group_id`;
|
|
|
|
|
|
|
|
ALTER TABLE `v2_plan`
|
|
|
|
CHANGE `month_price` `month_price` int(11) NULL DEFAULT '0' AFTER `content`,
|
|
|
|
CHANGE `quarter_price` `quarter_price` int(11) NULL DEFAULT '0' AFTER `month_price`,
|
|
|
|
CHANGE `half_year_price` `half_year_price` int(11) NULL DEFAULT '0' AFTER `quarter_price`,
|
2019-12-29 13:21:36 +08:00
|
|
|
CHANGE `year_price` `year_price` int(11) NULL DEFAULT '0' AFTER `half_year_price`;
|
|
|
|
|
|
|
|
ALTER TABLE `v2_server`
|
2019-12-30 16:21:50 +08:00
|
|
|
ADD `parent_id` int(11) NULL AFTER `group_id`;
|
|
|
|
|
|
|
|
CREATE TABLE `v2_mail_log` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
|
|
|
`email` varchar(64) NOT NULL,
|
|
|
|
`subject` varchar(255) NOT NULL,
|
|
|
|
`template_name` varchar(255) NOT NULL,
|
|
|
|
`error` varchar(255) DEFAULT NULL,
|
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL
|
2019-12-31 17:49:24 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE `v2_coupon` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
|
|
|
`code` char(32) NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
|
2020-01-01 01:50:05 +08:00
|
|
|
`type` tinyint(1) NOT NULL,
|
2019-12-31 17:49:24 +08:00
|
|
|
`value` int(11) NOT NULL,
|
2019-12-31 17:49:52 +08:00
|
|
|
`limit_use` int(11) DEFAULT NULL,
|
2020-01-01 01:50:05 +08:00
|
|
|
`started_at` int(11) NOT NULL,
|
|
|
|
`ended_at` int(11) NOT NULL,
|
2019-12-31 17:49:24 +08:00
|
|
|
`created_at` int(11) NOT NULL,
|
2020-01-01 01:50:05 +08:00
|
|
|
`updated_at` int(11) NOT NULL,
|
2020-01-01 15:59:53 +08:00
|
|
|
);
|
|
|
|
|
2020-01-01 17:55:16 +08:00
|
|
|
ALTER TABLE `v2_order`
|
|
|
|
ADD `discount_amount` int(11) NULL AFTER `total_amount`;
|