-- --------------------------------------------------------
-- Arrebol Consuntancy 
-- SUPER DB Instante: 
-- super user: 
-- version 1.0.1
-- http://www.arrebolconsultancy.com
-- --------------------------------------------------------

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 */;

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

--
-- Base de datos: `car_driver_tepic`
--
USE `car_driver_tepic`;

-- --------------------------------------------------------
  
--
-- Admin user: `cardriver` application user
--

CREATE USER 'crovinmobiliarialocalhost'@'localhost'
	IDENTIFIED BY 'At17o0lQ';
  
GRANT SELECT ON car_driver_tepic.* TO 'cardriverlocalhost'@'localhost';
GRANT INSERT, UPDATE, DELETE ON car_driver_tepic.* TO 'cardriverlocalhost'@'localhost';
GRANT EXECUTE ON PROCEDURE car_driver_tepic.ReportCustomerPay TO 'cardriverlocalhost'@'localhost';
GRANT EXECUTE ON PROCEDURE car_driver_tepic.ReportGoogleDrive TO 'cardriverlocalhost'@'localhost';
GRANT EXECUTE ON FUNCTION car_driver_tepic.buildFullPersonName TO 'cardriverlocalhost'@'localhost';
GRANT EXECUTE ON FUNCTION car_driver_tepic.totalOfSundaysBetweenDates TO 'cardriverlocalhost'@'localhost';
GRANT EXECUTE ON FUNCTION car_driver_tepic.totalDaysInARangeOfDates TO 'cardriverlocalhost'@'localhost';

-- --------------------------------------------------------
  
--
-- Admin user: `cardriverticket` application user
--

CREATE USER 'cardriverticketlocalhost'@'localhost'
	IDENTIFIED BY 'M0dUyeV8';
  
GRANT SELECT ON car_driver_tepic.TICKET TO 'cardriverticketlocalhost'@'localhost';
GRANT SELECT (id) ON car_driver_tepic.SALE TO 'cardriverticketlocalhost'@'localhost';

GRANT UPDATE (active, created_on, last_updated_on) ON car_driver_tepic.SALE TO 'cardriverticketlocalhost'@'localhost';
GRANT UPDATE (active, created_on, last_updated_on) ON car_driver_tepic.SANCTION TO 'cardriverticketlocalhost'@'localhost';
-- --------------------------------------------------------
CREATE USER 'cardriverreadonlylocalhost'@'localhost'
	IDENTIFIED BY 'loWO$5a45';

/*!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 */;