· 8 years ago · Jun 04, 2018, 10:26 AM
1-- MySQL dump 10.13 Distrib 5.6.31, for debian-linux-gnu (x86_64)
2--
3-- Host: localhost Database: photo_socmed
4-- ------------------------------------------------------
5-- Server version 5.6.31-0ubuntu0.14.04.2
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `accounts`
20--
21
22DROP TABLE IF EXISTS `accounts`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `accounts` (
26 `id` bigint(20) NOT NULL AUTO_INCREMENT,
27 `pk` bigint(20) NOT NULL,
28 `username` varchar(255) COLLATE utf8_bin NOT NULL,
29 `fullname` varchar(255) COLLATE utf8_bin NOT NULL,
30 `password` varchar(255) COLLATE utf8_bin NOT NULL,
31 `principal` tinyint(1) NOT NULL DEFAULT '0',
32 `active` tinyint(1) NOT NULL DEFAULT '1',
33 PRIMARY KEY (`id`)
34) ENGINE=MyISAM AUTO_INCREMENT=37360 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
35/*!40101 SET character_set_client = @saved_cs_client */;
36
37--
38-- Table structure for table `comments`
39--
40
41DROP TABLE IF EXISTS `comments`;
42/*!40101 SET @saved_cs_client = @@character_set_client */;
43/*!40101 SET character_set_client = utf8 */;
44CREATE TABLE `comments` (
45 `id` bigint(20) NOT NULL AUTO_INCREMENT,
46 `post_id` bigint(20) NOT NULL,
47 `account_id` bigint(20) NOT NULL,
48 `caption` text COLLATE utf8_bin NOT NULL,
49 `created` timestamp NULL DEFAULT NULL,
50 `modified` timestamp NULL DEFAULT NULL,
51 `active` tinyint(1) NOT NULL DEFAULT '1',
52 PRIMARY KEY (`id`)
53) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
54/*!40101 SET character_set_client = @saved_cs_client */;
55
56--
57-- Table structure for table `idols`
58--
59
60DROP TABLE IF EXISTS `idols`;
61/*!40101 SET @saved_cs_client = @@character_set_client */;
62/*!40101 SET character_set_client = utf8 */;
63CREATE TABLE `idols` (
64 `id` bigint(20) NOT NULL AUTO_INCREMENT,
65 `account_id` bigint(20) NOT NULL,
66 `member_id` bigint(20) NOT NULL,
67 `active` tinyint(1) NOT NULL DEFAULT '1',
68 PRIMARY KEY (`id`)
69) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
70/*!40101 SET character_set_client = @saved_cs_client */;
71
72--
73-- Table structure for table `likes`
74--
75
76DROP TABLE IF EXISTS `likes`;
77/*!40101 SET @saved_cs_client = @@character_set_client */;
78/*!40101 SET character_set_client = utf8 */;
79CREATE TABLE `likes` (
80 `id` bigint(20) NOT NULL AUTO_INCREMENT,
81 `post_id` bigint(20) NOT NULL,
82 `account_id` bigint(20) NOT NULL,
83 `created` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
84 `modified` timestamp NULL DEFAULT NULL,
85 `active` tinyint(1) NOT NULL DEFAULT '1',
86 PRIMARY KEY (`id`)
87) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
88/*!40101 SET character_set_client = @saved_cs_client */;
89
90--
91-- Temporary view structure for view `members`
92--
93
94DROP TABLE IF EXISTS `members`;
95/*!50001 DROP VIEW IF EXISTS `members`*/;
96SET @saved_cs_client = @@character_set_client;
97SET character_set_client = utf8;
98/*!50001 CREATE VIEW `members` AS SELECT
99 1 AS `id`,
100 1 AS `pk`,
101 1 AS `username`,
102 1 AS `fullname`,
103 1 AS `password`,
104 1 AS `principal`,
105 1 AS `active`*/;
106SET character_set_client = @saved_cs_client;
107
108--
109-- Table structure for table `photos`
110--
111
112DROP TABLE IF EXISTS `photos`;
113/*!40101 SET @saved_cs_client = @@character_set_client */;
114/*!40101 SET character_set_client = utf8 */;
115CREATE TABLE `photos` (
116 `id` bigint(20) NOT NULL AUTO_INCREMENT,
117 `account_id` bigint(20) NOT NULL,
118 `created` timestamp NULL DEFAULT NULL,
119 `modified` timestamp NULL DEFAULT NULL,
120 `uploaded` tinyint(1) NOT NULL DEFAULT '0',
121 `caption` text COLLATE utf8_bin,
122 `filetype` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'jpg',
123 `active` tinyint(1) NOT NULL DEFAULT '1',
124 PRIMARY KEY (`id`)
125) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
126/*!40101 SET character_set_client = @saved_cs_client */;
127
128--
129-- Table structure for table `posts`
130--
131
132DROP TABLE IF EXISTS `posts`;
133/*!40101 SET @saved_cs_client = @@character_set_client */;
134/*!40101 SET character_set_client = utf8 */;
135CREATE TABLE `posts` (
136 `id` bigint(20) NOT NULL AUTO_INCREMENT,
137 `pk` bigint(20) NOT NULL,
138 `mediaId` varchar(255) DEFAULT NULL,
139 `account_id` bigint(20) NOT NULL,
140 `loves` int(11) NOT NULL DEFAULT '0',
141 `gloss` int(11) NOT NULL DEFAULT '0',
142 `takenat` int(11) NOT NULL,
143 `caption` text,
144 `url` varchar(255) NOT NULL,
145 `width` int(11) NOT NULL DEFAULT '0',
146 `height` int(11) NOT NULL DEFAULT '0',
147 `type` tinyint(4) NOT NULL DEFAULT '1',
148 `active` tinyint(1) NOT NULL DEFAULT '1',
149 PRIMARY KEY (`id`)
150) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=latin1;
151/*!40101 SET character_set_client = @saved_cs_client */;
152
153--
154-- Table structure for table `vassals`
155--
156
157DROP TABLE IF EXISTS `vassals`;
158/*!40101 SET @saved_cs_client = @@character_set_client */;
159/*!40101 SET character_set_client = utf8 */;
160CREATE TABLE `vassals` (
161 `id` bigint(20) NOT NULL AUTO_INCREMENT,
162 `idol_id` bigint(20) NOT NULL,
163 `account_id` bigint(20) NOT NULL,
164 `followed` tinyint(1) NOT NULL DEFAULT '0',
165 `active` tinyint(1) NOT NULL DEFAULT '1',
166 PRIMARY KEY (`id`)
167) ENGINE=MyISAM AUTO_INCREMENT=37276 DEFAULT CHARSET=latin1;
168/*!40101 SET character_set_client = @saved_cs_client */;
169
170--
171-- Final view structure for view `members`
172--
173
174/*!50001 DROP VIEW IF EXISTS `members`*/;
175/*!50001 SET @saved_cs_client = @@character_set_client */;
176/*!50001 SET @saved_cs_results = @@character_set_results */;
177/*!50001 SET @saved_col_connection = @@collation_connection */;
178/*!50001 SET character_set_client = utf8mb4 */;
179/*!50001 SET character_set_results = utf8mb4 */;
180/*!50001 SET collation_connection = utf8mb4_unicode_ci */;
181/*!50001 CREATE ALGORITHM=UNDEFINED */
182/*!50013 DEFINER=`miyazghayda`@`%` SQL SECURITY DEFINER */
183/*!50001 VIEW `members` AS select `accounts`.`id` AS `id`,`accounts`.`pk` AS `pk`,`accounts`.`username` AS `username`,`accounts`.`fullname` AS `fullname`,`accounts`.`password` AS `password`,`accounts`.`principal` AS `principal`,`accounts`.`active` AS `active` from `accounts` where (1 = 1) */;
184/*!50001 SET character_set_client = @saved_cs_client */;
185/*!50001 SET character_set_results = @saved_cs_results */;
186/*!50001 SET collation_connection = @saved_col_connection */;
187/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
188
189/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
190/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
191/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
192/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
193/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
194/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
195/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
196
197-- Dump completed on 2018-05-31 21:00:20