-
Notifications
You must be signed in to change notification settings - Fork 1
/
atoropics.sql
125 lines (98 loc) · 4.09 KB
/
atoropics.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
DROP TABLE IF EXISTS `atoropics_apikeys`;
CREATE TABLE `atoropics_apikeys` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`api_key` text NOT NULL,
`owner_api_key` text NOT NULL,
`name` text NOT NULL,
`created` datetime NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
LOCK TABLES `atoropics_apikeys` WRITE;
UNLOCK TABLES;
DROP TABLE IF EXISTS `atoropics_domains`;
CREATE TABLE `atoropics_domains` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`domain` text DEFAULT NULL,
`description` text NOT NULL DEFAULT 'The default description of the domain',
`ownerkey` text DEFAULT NULL,
`enabled` enum('true','false','suspendet') NOT NULL,
`created-date` datetime NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
LOCK TABLES `atoropics_domains` WRITE;
UNLOCK TABLES;
DROP TABLE IF EXISTS `atoropics_imgs`;
CREATE TABLE `atoropics_imgs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`owner_key` varchar(255) NOT NULL,
`size` varchar(255) NOT NULL,
`storage_folder` text NOT NULL,
`created_at` datetime NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
LOCK TABLES `atoropics_imgs` WRITE;
UNLOCK TABLES;
DROP TABLE IF EXISTS `atoropics_nodes`;
CREATE TABLE `atoropics_nodes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text DEFAULT NULL COMMENT 'The name of the node',
`domain` text DEFAULT NULL COMMENT 'The domain of the nodes ex: "node-1.yourimghost.net"',
`description` text DEFAULT NULL COMMENT 'The description of the node',
`ip` text DEFAULT NULL COMMENT 'The server ip to connect to the ssh console! ',
`port` text DEFAULT NULL COMMENT 'The server port to connect to the daemon',
`username` text DEFAULT NULL COMMENT 'The username for the ssh user',
`password` text DEFAULT NULL COMMENT 'The password for the ssh user',
`created-date` datetime NOT NULL DEFAULT current_timestamp() COMMENT 'The creation date for the node',
`enabled` enum('true','false') NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
LOCK TABLES `atoropics_nodes` WRITE;
UNLOCK TABLES;
DROP TABLE IF EXISTS `atoropics_settings`;
CREATE TABLE `atoropics_settings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_name` text NOT NULL DEFAULT 'AtoroPics',
`app_logo` text NOT NULL DEFAULT 'https://avatars.githubusercontent.com/u/118304455',
`app_maintenance` enum('false','true') NOT NULL DEFAULT 'false',
`app_proto` varchar(255) NOT NULL,
`app_url` varchar(255) NOT NULL,
`enable_registration` enum('true','false') NOT NULL,
`enable_rechapa2` enum('false','true') NOT NULL,
`rechapa2_site_key` text DEFAULT NULL,
`rechapa2_site_secret` text DEFAULT NULL,
`discord` varchar(255) NOT NULL,
`enable_smtp` enum('false','true') NOT NULL,
`smtp_host` varchar(255) NOT NULL,
`smtp_port` varchar(255) NOT NULL,
`smtp_user` varchar(255) NOT NULL,
`smtp_password` varchar(255) NOT NULL,
`smtp_from` varchar(255) NOT NULL,
`smtp_from_name` varchar(255) NOT NULL,
`discord_webhook` varchar(255) NOT NULL,
`version` text NOT NULL DEFAULT '1.3.6',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
LOCK TABLES `atoropics_settings` WRITE;
UNLOCK TABLES;
DROP TABLE IF EXISTS `atoropics_users`;
CREATE TABLE `atoropics_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` text NOT NULL,
`avatar` text DEFAULT NULL,
`email` text NOT NULL,
`password` text NOT NULL,
`code` text NOT NULL,
`last_ip` text DEFAULT 'localhost',
`register_ip` text DEFAULT 'localhost',
`api_key` text NOT NULL,
`admin` enum('false','true') NOT NULL DEFAULT 'false',
`embed_title` text DEFAULT NULL,
`embed_small_title` text DEFAULT NULL,
`embed_desc` text DEFAULT NULL,
`embed_theme` text DEFAULT NULL,
`embed_domain` text DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
LOCK TABLES `atoropics_users` WRITE;
UNLOCK TABLES;