-
Notifications
You must be signed in to change notification settings - Fork 1
/
structure.sql
109 lines (91 loc) · 2.34 KB
/
structure.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
-- phpMyAdmin SQL Dump
-- version 4.4.13.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 27, 2017 at 04:23 PM
-- Server version: 5.6.31-0ubuntu0.15.10.1
-- PHP Version: 5.6.11-1ubuntu3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `solsearch`
--
-- --------------------------------------------------------
--
-- Table structure for table `ads`
--
CREATE TABLE IF NOT EXISTS `ads` (
`uuid` varchar(42) NOT NULL,
`id` int(7) NOT NULL,
`type` varchar(12) NOT NULL,
`title` tinytext NOT NULL,
`body` text NOT NULL,
`keywords` tinytext NOT NULL,
`directexchange` tinyint(1) NOT NULL,
`indirectexchange` tinyint(1) NOT NULL,
`money` tinyint(1) NOT NULL,
`scope` tinyint(1) NOT NULL DEFAULT '0',
`expires` int(14) NOT NULL COMMENT 'unixtime',
`path` varchar(32) NOT NULL,
`client_id` int(11) NOT NULL,
`location` point NOT NULL,
`image` varchar(128) DEFAULT NULL,
`lang` varchar(2) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `clients`
--
CREATE TABLE IF NOT EXISTS `clients` (
`id` int(11) NOT NULL,
`url` varchar(32) NOT NULL,
`name` tinytext NOT NULL,
`apikey` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `log`
--
CREATE TABLE IF NOT EXISTS `log` (
`id` int(11) NOT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`message` text NOT NULL,
`client_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `ads`
--
ALTER TABLE `ads`
ADD UNIQUE KEY `uuid` (`uuid`),
ADD UNIQUE KEY `id` (`id`,`client_id`),
ADD KEY `location` (`location`(25)),
ADD KEY `location_2` (`location`(25));
--
-- Indexes for table `clients`
--
ALTER TABLE `clients`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `apikey` (`apikey`),
ADD UNIQUE KEY `url` (`url`);
--
-- Indexes for table `log`
--
ALTER TABLE `log`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `clients`
--
ALTER TABLE `clients`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `log`
--
ALTER TABLE `log`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;