-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `emyo`
--

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

--
-- Table structure for table `emailUsers`
--

CREATE TABLE `emailUsers` (
  `user_id` int(11) NOT NULL,
  `email` varchar(300) COLLATE utf8_turkish_ci DEFAULT NULL,
  `name` varchar(100) COLLATE utf8_turkish_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci;

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

--
-- Table structure for table `feed`
--

CREATE TABLE `feed` (
  `feed_id` int(11) NOT NULL,
  `feed` text COLLATE utf8_turkish_ci,
  `user_id_fk` int(11) DEFAULT NULL,
  `created` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci;

--
-- Dumping data for table `feed`
--

INSERT INTO `feed` (`feed_id`, `feed`, `user_id_fk`, `created`) VALUES
(1, 'perşembe', 8, 1648625959),
(2, 'dsfsdsf', 8, 1648625770),
(3, 'bu yeni metin olacak', 8, 1648025913),
(4, 'ses deneme 1 ', 8, 1557314573),
(5, 'merhaba', 8, 1557314762),
(6, 'Mesaj deneme 12314', 8, 1648560801),
(7, 'sdfghj', 8, 1557319917),
(8, 'ses deneme 1 ', 8, 1557320467),
(9, 'ses deneme 1 ', 8, 1557320484),
(10, 'deneme', 9, 1557321232),
(11, 'sdfghm', 9, 1557321233),
(12, 'bu bir mesaj', 8, 1557339246),
(13, 'test', 9, 1648025512),
(22, 'limon', 8, 1648642265),
(23, 'elma', 8, 1648642562);

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

--
-- Table structure for table `imagesData`
--

CREATE TABLE `imagesData` (
  `img_id` int(11) NOT NULL,
  `b64` text COLLATE utf8_turkish_ci,
  `user_id_fk` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci;

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

--
-- Stand-in structure for view `user_feed`
-- (See below for the actual view)
--
CREATE TABLE `user_feed` (
`feed_id` int(11)
,`feed` text
,`user_id_fk` int(11)
,`created` int(11)
,`user_id` int(11)
,`username` varchar(50)
,`name` varchar(200)
,`email` varchar(300)
);

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

--
-- Structure for view `user_feed`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `user_feed`  AS SELECT `feed`.`feed_id` AS `feed_id`, `feed`.`feed` AS `feed`, `feed`.`user_id_fk` AS `user_id_fk`, `feed`.`created` AS `created`, `users`.`user_id` AS `user_id`, `users`.`username` AS `username`, `users`.`name` AS `name`, `users`.`email` AS `email` FROM (`users` join `feed` on((`users`.`user_id` = `feed`.`user_id_fk`))) ;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `emailUsers`
--
ALTER TABLE `emailUsers`
  ADD PRIMARY KEY (`user_id`);

--
-- Indexes for table `feed`
--
ALTER TABLE `feed`
  ADD PRIMARY KEY (`feed_id`);

--
-- Indexes for table `imagesData`
--
ALTER TABLE `imagesData`
  ADD PRIMARY KEY (`img_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `emailUsers`
--
ALTER TABLE `emailUsers`
  MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `feed`
--
ALTER TABLE `feed`
  MODIFY `feed_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `imagesData`
--
ALTER TABLE `imagesData`
  MODIFY `img_id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

