-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcrypto.sql
More file actions
121 lines (96 loc) · 2.65 KB
/
crypto.sql
File metadata and controls
121 lines (96 loc) · 2.65 KB
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
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 09, 2018 at 07:33 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.1.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
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: `crypto`
--
-- --------------------------------------------------------
--
-- Table structure for table `curr_value`
--
CREATE TABLE `curr_value` (
`u_id` varchar(30) NOT NULL,
`c_type` varchar(30) NOT NULL,
`qty` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `logs`
--
CREATE TABLE `logs` (
`u_id` varchar(30) NOT NULL,
`c_type` varchar(30) NOT NULL,
`qty` int(11) NOT NULL,
`tym` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`buy` int(11) NOT NULL,
`sell` int(11) NOT NULL,
`c_price` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `logs`
--
INSERT INTO `logs` (`u_id`, `c_type`, `qty`, `tym`, `buy`, `sell`, `c_price`) VALUES
('123', 'BTC', 11, '2018-06-09 04:46:03', 10, 10, 1000);
-- --------------------------------------------------------
--
-- Table structure for table `user_data`
--
CREATE TABLE `user_data` (
`u_id` varchar(30) NOT NULL,
`u_pass` varchar(30) NOT NULL,
`u_name` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user_data`
--
INSERT INTO `user_data` (`u_id`, `u_pass`, `u_name`) VALUES
('123', 'Sumeet', 'sumeet');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `curr_value`
--
ALTER TABLE `curr_value`
ADD KEY `u_id` (`u_id`);
--
-- Indexes for table `logs`
--
ALTER TABLE `logs`
ADD PRIMARY KEY (`tym`),
ADD KEY `u_id` (`u_id`);
--
-- Indexes for table `user_data`
--
ALTER TABLE `user_data`
ADD PRIMARY KEY (`u_id`);
--
-- Constraints for dumped tables
--
--
-- Constraints for table `curr_value`
--
ALTER TABLE `curr_value`
ADD CONSTRAINT `curr_value_ibfk_1` FOREIGN KEY (`u_id`) REFERENCES `user_data` (`u_id`);
--
-- Constraints for table `logs`
--
ALTER TABLE `logs`
ADD CONSTRAINT `logs_ibfk_1` FOREIGN KEY (`u_id`) REFERENCES `user_data` (`u_id`);
COMMIT;
/*!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 */;