· 5 years ago · Mar 23, 2020, 07:04 AM
1CREATE TABLE IF NOT EXISTS `account_feature` (
2 `id` int(11) NOT NULL AUTO_INCREMENT,
3 `account_id` int(11) NOT NULL,
4 `feature_id` int(11) NOT NULL,
5 `updated_by` tinyint(4) DEFAULT NULL,
6 `status` tinyint(4) NOT NULL,
7 `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
8 `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
9 PRIMARY KEY (`id`)
10) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
11
12CREATE TABLE IF NOT EXISTS `feature` (
13 `id` int(11) NOT NULL AUTO_INCREMENT,
14 `parent_id` int(11) DEFAULT NULL,
15 `name` varchar(255) NOT NULL,
16 `created_by` int(11) DEFAULT NULL,
17 `status` tinyint(4) NOT NULL,
18 `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
19 `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
20 PRIMARY KEY (`id`)
21) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
22
23CREATE TABLE IF NOT EXISTS `file` (
24 `id` int(11) NOT NULL AUTO_INCREMENT,
25 `name` varchar(255) NOT NULL,
26 `url` varchar(255) NOT NULL,
27 `metadata` json NOT NULL,
28 `sp_metadata` json NOT NULL,
29 `type` varchar(50) NOT NULL,
30 `extension` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
31 `created_by` int(11) NOT NULL,
32 `status` tinyint(4) NOT NULL,
33 `is_deleted` tinyint(4) NOT NULL DEFAULT '0',
34 `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
35 `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
36 PRIMARY KEY (`id`)
37) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
38
39CREATE TABLE IF NOT EXISTS `service_provider_credential` (
40 `id` int(11) NOT NULL AUTO_INCREMENT,
41 `account_id` int(11) DEFAULT NULL,
42 `name` varchar(255) NOT NULL,
43 `credential` json NOT NULL,
44 `feature_id` int(11) NOT NULL,
45 `created_by` int(11) NOT NULL,
46 `status` tinyint(4) NOT NULL,
47 `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
48 `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
49 PRIMARY KEY (`id`)
50) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;