--
-- Host: localhost    Database: test_artem
-- ------------------------------------------------------


--
-- Table structure for table `sourcetable1`
--

CREATE TABLE `sourcetable1` (
  `id` uuid NOT NULL,
  `col1` int(11) NOT NULL DEFAULT 0,
  `col2` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `sourcetable1`
--


--
-- Table structure for table `sourcetable2`
--

CREATE TABLE `sourcetable2` (
  `id` uuid NOT NULL,
  `col1` int(11) NOT NULL DEFAULT 0,
  `col2` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `sourcetable2`
--


--
-- Temporary table structure for view `view1`
--

/*!50001 DROP VIEW IF EXISTS `view1`*/;
/*!50001 CREATE VIEW `view1` AS SELECT
 1 AS `v2id`,
  1 AS `v2c1`,
  1 AS `t2c1`,
  1 AS `t2c2` */;

--
-- Temporary table structure for view `view2`
--

/*!50001 DROP VIEW IF EXISTS `view2`*/;
/*!50001 CREATE VIEW `view2` AS SELECT
 1 AS `id`,
  1 AS `col1` */;

--
-- Final view structure for view `view1`
--

/*!50001 DROP VIEW IF EXISTS `view1`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`a.perekresny`@`10.90.0.%` SQL SECURITY DEFINER */
/*!50001 VIEW `view1` AS select `v2`.`id` AS `v2id`,`v2`.`col1` AS `v2c1`,`t2`.`col1` AS `t2c1`,`t2`.`col2` AS `t2c2` from (`view2` `v2` join `sourcetable2` `t2` on(`t2`.`id` = `v2`.`id`)) */;

--
-- Final view structure for view `view2`
--

/*!50001 DROP VIEW IF EXISTS `view2`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`a.perekresny`@`10.90.0.%` SQL SECURITY DEFINER */
/*!50001 VIEW `view2` AS select `sourcetable1`.`id` AS `id`,`sourcetable1`.`col1` AS `col1` from `sourcetable1` */;


