openvk/install/sqls/00030-bug-tracker.sql

61 lines
1.5 KiB
MySQL
Raw Normal View History

2022-08-20 20:36:01 +03:00
/* bugs */
CREATE TABLE `bugs` (
`id` bigint(20) NOT NULL,
`reporter` bigint(20) NOT NULL,
`title` varchar(255) NOT NULL,
`text` varchar(1000) NOT NULL,
`product_id` bigint(20) NOT NULL,
`status` int(11) NOT NULL DEFAULT 0,
`priority` int(11) NOT NULL DEFAULT 2,
`device` varchar(255) NOT NULL,
`reproduced` bigint(20) NOT NULL DEFAULT 0,
`deleted` tinyint(1) DEFAULT NULL,
`created` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `bugs`
ADD PRIMARY KEY (`id`);
ALTER TABLE `bugs`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
COMMIT;
/* bt_products */
CREATE TABLE `bt_products` (
`id` bigint(20) NOT NULL,
`creator_id` bigint(20) NOT NULL,
`title` varchar(255) NOT NULL,
`description` varchar(10000) NOT NULL,
`created` bigint(20) NOT NULL,
`closed` tinyint(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `bt_products`
ADD PRIMARY KEY (`id`);
ALTER TABLE `bt_products`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
COMMIT;
/* bt_comments */
CREATE TABLE `bt_comments` (
`id` bigint(20) NOT NULL,
`report` bigint(20) NOT NULL,
`author` bigint(20) NOT NULL,
`is_moder` tinyint(1) DEFAULT NULL,
`is_hidden` tinyint(1) DEFAULT NULL,
`text` longtext NOT NULL,
2022-08-21 23:34:36 +03:00
`label` varchar(50) NOT NULL,
2022-08-22 02:11:48 +03:00
`point_actions` bigint(20) DEFAULT NULL,
`created` bigint(20) NOT NULL
2022-08-20 20:36:01 +03:00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `bt_comments`
ADD PRIMARY KEY (`id`);
ALTER TABLE `bt_comments`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
COMMIT;