-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathini.sql
175 lines (143 loc) · 4.83 KB
/
ini.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 27 Nov 2018 pada 18.50
-- Versi Server: 10.1.26-MariaDB
-- PHP Version: 7.1.9
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: `tubesimpal`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `chat`
--
CREATE TABLE `chat` (
`id_chat` int(10) NOT NULL,
`pengirim` varchar(10) NOT NULL,
`waktu` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`teks` text NOT NULL,
`username` varchar(10) NOT NULL,
`penerima` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `obat`
--
CREATE TABLE `obat` (
`id_obat` varchar(10) NOT NULL,
`nama_obat` varchar(50) NOT NULL,
`type_obat` varchar(50) NOT NULL,
`harga_obat` int(50) NOT NULL,
`promo_obat` int(50) NOT NULL,
`sisa_obat` int(50) NOT NULL,
`deskripsi_obat` text NOT NULL,
`image` varchar(50) NOT NULL,
`produk_obat` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `obat`
--
INSERT INTO `obat` (`id_obat`, `nama_obat`, `type_obat`, `harga_obat`, `promo_obat`, `sisa_obat`, `deskripsi_obat`, `image`, `produk_obat`) VALUES
('12', 'obattttt', 'PIL', 123, 34, 23, 'asdasdasd', 'file_1542614912.jpg', 'Alat Kesehatan'),
('123', 'asd', 'None', 23, 12, 34, 'Facere sit accusamus expedita cupiditate sapiente molestias dignissimos occaecat repellendus Dolorem sed iste sit culpa quis omnis qui provident id', 'file_1542417325.jpg', 'Perawat Kecantikan'),
('2', 'paracetamol', 'PIL', 123, 123, 213, 'dadasdasdasdasdasdasdasdasdadasdasda', 'file_1542412747.jpg', 'Alat Kesehatan'),
('234', 'asdfd', 'PIL', 23, 12, 12, 'sdsddsffsdsdfsdffdgsdfdafasdf', 'file_1542952819.jpg', 'Alat Kesehatan'),
('45', 'asdfdgdfg', 'PIL', 234, 0, 0, 'sdfsdf s', 'file_1542615210.jpg', 'Bayi dan Anak'),
('adit', 'adit', 'Sirup', 123, 12, 12, 'fsdgzdgfgsdfgzdfgs gc wfadasdfasdfasdf', 'file_1542988916.jpg', 'Obat'),
('fghfgh', 'fghfgh', 'Sirup', 243, 55, 12, 'dfsdfd fzsdfdfzsdfzsdfzsdf', 'file_1542615320.jpg', 'Alat Kesehatan'),
('zfSz', 'obattttt', 'PIL', 56, 56, 677, 'hydhfu', 'file_1542431973.jpg', 'Alat Kesehatan'),
('zxc', 'zxc', 'PIL', 112, 12, 12, 'tr', 'file_1543050698.jpg', 'Alat Kesehatan');
-- --------------------------------------------------------
--
-- Struktur dari tabel `pengambilan_obat`
--
CREATE TABLE `pengambilan_obat` (
`nama` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`hari_pengambilan` date NOT NULL,
`jam_pengambilan` time NOT NULL,
`no_telepon` varchar(50) NOT NULL,
`foto_pengambilan` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `pengembalian_obat`
--
CREATE TABLE `pengembalian_obat` (
`nama` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`jenis_obat` varchar(50) NOT NULL,
`jumlah_obat` varchar(50) NOT NULL,
`tanggal_pengembalian` date NOT NULL,
`foto_pengembalian` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktur dari tabel `user`
--
CREATE TABLE `user` (
`fullname` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`username` varchar(10) NOT NULL,
`password` varchar(20) NOT NULL,
`foto_user` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `chat`
--
ALTER TABLE `chat`
ADD PRIMARY KEY (`id_chat`),
ADD UNIQUE KEY `username` (`username`);
--
-- Indexes for table `obat`
--
ALTER TABLE `obat`
ADD PRIMARY KEY (`id_obat`);
--
-- Indexes for table `pengambilan_obat`
--
ALTER TABLE `pengambilan_obat`
ADD PRIMARY KEY (`email`);
--
-- Indexes for table `pengembalian_obat`
--
ALTER TABLE `pengembalian_obat`
ADD PRIMARY KEY (`email`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`username`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `chat`
--
ALTER TABLE `chat`
MODIFY `id_chat` int(10) NOT NULL AUTO_INCREMENT;
--
-- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables)
--
--
-- Ketidakleluasaan untuk tabel `chat`
--
ALTER TABLE `chat`
ADD CONSTRAINT `chat_ibfk_1` FOREIGN KEY (`username`) REFERENCES `user` (`username`);
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 */;