0% found this document useful (0 votes)
196 views5 pages

Daada

This document contains SQL code to define the structure and populate data for two database tables: the "users" table containing user account information, and the "users_groups" table defining what user groups each user belongs to. The SQL code first defines the structure of each table, then provides INSERT statements to populate them with initial user and user group data. Primary and foreign keys are also defined to link the tables together.

Uploaded by

cak myt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
196 views5 pages

Daada

This document contains SQL code to define the structure and populate data for two database tables: the "users" table containing user account information, and the "users_groups" table defining what user groups each user belongs to. The SQL code first defines the structure of each table, then provides INSERT statements to populate them with initial user and user group data. Primary and foreign keys are also defined to link the tables together.

Uploaded by

cak myt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

-- phpMyAdmin SQL Dump

-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Jan 06, 2019 at 03:37 AM
-- Server version: 5.7.23
-- PHP Version: 7.2.8

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


SET time_zone = "+00:00";

--
-- Database: `pujasera`
--

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (


`id` int(11) UNSIGNED NOT NULL,
`ip_address` varchar(45) NOT NULL,
`username` varchar(100) DEFAULT NULL,
`password` varchar(255) NOT NULL,
`salt` varchar(255) DEFAULT NULL,
`email` varchar(254) NOT NULL,
`activation_code` varchar(40) DEFAULT NULL,
`forgotten_password_code` varchar(40) DEFAULT NULL,
`forgotten_password_time` int(11) UNSIGNED DEFAULT NULL,
`remember_code` varchar(40) DEFAULT NULL,
`created_on` int(11) UNSIGNED NOT NULL,
`last_login` int(11) UNSIGNED DEFAULT NULL,
`active` tinyint(1) UNSIGNED DEFAULT NULL,
`first_name` varchar(50) DEFAULT NULL,
`last_name` varchar(50) DEFAULT NULL,
`company` varchar(100) DEFAULT NULL,
`phone` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `ip_address`, `username`, `password`, `salt`, `email`,
`activation_code`, `forgotten_password_code`, `forgotten_password_time`,
`remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`,
`company`, `phone`) VALUES
(1, '127.0.0.1', 'administrator',
'$2a$07$SeBknntpZror9uyftVopmu61qg0ms8Qv1yV6FG.kQOSM.9QhmTo36', '',
'[email protected]', '', NULL, NULL, NULL, 1268889823, 1546709562, 1, 'Admin',
'istrator', 'ADMIN', '0'),
(9, '::1', 'Tsabbit Aqdami Mukhtar',
'$2y$08$EzDqrFwveuHwRe2gKGNLW.QrZLbSdvLqf0cY6TYc1mGYhsinIVLUS', NULL,
'[email protected]', NULL, NULL, NULL, NULL, 1523863799, 1526042783, 1,
NULL, NULL, '1', '85730802309'),
(147, '::1', '1',
'$2y$08$3WVlJdOdEg3j7/CbCQ77a.b74DiSFu4dTQ3ufsFfMcxU3Ue6f3dim', NULL,
'[email protected]', NULL, NULL, NULL, NULL, 1544824817, NULL, 1, NULL,
NULL, 'Merchant', '098888'),
(148, '::1', 'Bakso Kawi',
'$2y$08$fTC2C.86unTJng1gj.Cd9OizZqWBsHrnBwZjUX2Qddk1H6Ysuawei', NULL,
'[email protected]', NULL, NULL, NULL, NULL, 1544914514, 1546600450, 1, NULL,
NULL, 'Merchant', '0812817188'),
(149, '::1', 'Nasi Goreng Gila',
'$2y$08$uKoML1OFWdTc5UZNToMqYuCwZ/0DxH1ppF21n8Zg0tYSkMX4Qnd6q',
NULL, '[email protected]', NULL, NULL, NULL, NULL, 1544915441, 1545976452, 1,
NULL, NULL, 'Merchant', '08121800999'),
(151, '::1', 'Tsabbit',
'$2y$08$VVf8s3At8Pq1VyT5VECvvOc9a02DDcmWdASPIRokKs5G6rXQpAUAG',
NULL, '[email protected]', NULL, NULL, NULL, NULL, 1545025598, 1546706423, 1,
NULL, NULL, 'Kasir', '08121800999'),
(152, '::1', 'Sate Ayam',
'$2y$08$EuA8hVvIWk2x1bDKW/cmGOFGXhkgrbQ4n9YhQzC7miDpq4cO9Yx.m',
NULL, '[email protected]', NULL, NULL, NULL, NULL, 1546474566, 1546476016, 1,
NULL, NULL, 'Merchant', '08119991999'),
(153, '::1', 'Bakso Rusuk Har',
'$2y$08$8BR0XyFfGyS7/Wq2d0Br0.l7qkFMnfiNpNP4q4XOaGVuDnw8fA8qG', NULL,
'[email protected]', NULL, NULL, NULL, NULL, 1546474611, 1546596230, 1, NULL,
NULL, 'Merchant', '0819191991');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=154;

-- phpMyAdmin SQL Dump


-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Jan 06, 2019 at 03:39 AM
-- Server version: 5.7.23
-- PHP Version: 7.2.8

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


SET time_zone = "+00:00";

--
-- Database: `pujasera`
--

-- --------------------------------------------------------

--
-- Table structure for table `users_groups`
--

CREATE TABLE `users_groups` (


`id` int(11) UNSIGNED NOT NULL,
`user_id` int(11) UNSIGNED NOT NULL,
`group_id` mediumint(8) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `users_groups`
--

INSERT INTO `users_groups` (`id`, `user_id`, `group_id`) VALUES


(1, 1, 1),
(2, 1, 2),
(6, 9, 1),
(144, 147, 3),
(145, 148, 2),
(146, 149, 2),
(148, 151, 3),
(149, 152, 2),
(150, 153, 2);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `users_groups`
--
ALTER TABLE `users_groups`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `uc_users_groups` (`user_id`,`group_id`),
ADD KEY `fk_users_groups_users1_idx` (`user_id`),
ADD KEY `fk_users_groups_groups1_idx` (`group_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `users_groups`
--
ALTER TABLE `users_groups`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=151;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `users_groups`
--
ALTER TABLE `users_groups`
ADD CONSTRAINT `fk_users_groups_groups1` FOREIGN KEY (`group_id`)
REFERENCES `groups` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_users_groups_users1` FOREIGN KEY (`user_id`)
REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;

You might also like