-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.sql
99 lines (82 loc) · 2.66 KB
/
database.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
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 22, 2019 at 11:30 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `1_database`
--
-- --------------------------------------------------------
--
-- Table structure for table `products`
--
CREATE TABLE `products` (
`product_id` int(11) NOT NULL,
`profile_id` int(11) NOT NULL,
`name` varchar(64) NOT NULL,
`description` varchar(256) NOT NULL,
`price` float NOT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `profiles`
--
CREATE TABLE `profiles` (
`profile_id` int(11) NOT NULL,
`username` varchar(32) NOT NULL,
`phone_number` varchar(11) NOT NULL,
`email` varchar(256) NOT NULL,
`password` varchar(256) NOT NULL,
`manager_name` varchar(64) NOT NULL,
`logo` varchar(256) NOT NULL DEFAULT 'default.png',
`latitude` double NOT NULL,
`longitude` double NOT NULL,
`bio` varchar(256) NOT NULL,
`facebook` varchar(32) NOT NULL,
`instagram` varchar(32) NOT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `profiles`
--
INSERT INTO `profiles` (`profile_id`, `username`, `phone_number`, `email`, `password`, `manager_name`, `logo`, `latitude`, `longitude`, `bio`, `facebook`, `instagram`, `created_at`) VALUES
(4, 'a', '01014104728', '', '$2y$10$Z3ENiy7.oFUx5lIfco8VLO6h5UXOtfbIq0LqrmqJPbZqe.x.OsZFK', 'Ù…Øمود', 'default.png', 0, 0, '', '', '', '2019-12-21 20:06:27');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`product_id`);
--
-- Indexes for table `profiles`
--
ALTER TABLE `profiles`
ADD PRIMARY KEY (`profile_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
MODIFY `product_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `profiles`
--
ALTER TABLE `profiles`
MODIFY `profile_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;