Commit 46b731b1 authored by Mārcis Koloda's avatar Mārcis Koloda
Browse files

pievienoti parauga faili

parents
-- phpMyAdmin SQL Dump
-- version 4.4.15.5
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1:3306
-- Generation Time: May 07, 2017 at 09:36 PM
-- Server version: 5.6.34-log
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `posts`
--
CREATE DATABASE IF NOT EXISTS `posts` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `posts`;
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE IF NOT EXISTS `categories` (
`ID` int(14) NOT NULL,
`title` varchar(100) NOT NULL,
`seq` int(1) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `categories`
--
INSERT INTO `categories` (`ID`, `title`, `seq`) VALUES
(1, 'Notikumi', 1),
(2, 'Studiju informācija', 2),
(3, 'Sludinājumi', 3);
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE IF NOT EXISTS `comments` (
`ID` int(11) NOT NULL,
`context` text NOT NULL,
`commentdate` varchar(45) NOT NULL,
`posts_ID` int(11) NOT NULL,
`user_id` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `comments`
--
INSERT INTO `comments` (`ID`, `context`, `commentdate`, `posts_ID`, `user_id`) VALUES
(1, 'Kā pārbaudīt tehnisko stāvokli?', '08.05.2017 13:25', 5, 2);
-- --------------------------------------------------------
--
-- Table structure for table `posts`
--
CREATE TABLE IF NOT EXISTS `posts` (
`ID` int(11) NOT NULL,
`title` varchar(100) NOT NULL,
`context` text NOT NULL,
`postdate` varchar(45) NOT NULL,
`category_id` int(14) NOT NULL,
`users_ID` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `posts`
--
INSERT INTO `posts` (`ID`, `title`, `context`, `postdate`, `category_id`, `users_ID`) VALUES
(1, 'Rektora apstiprināšana', 'Šodien LR Ministru kabinets apstiprināja Kārli Krēsliņu par Ventspils Augstskolas rektoru. Apsveicam!!!', '03.05.2017 13:39', 1, 1),
(2, 'Jaunie darbinieki', 'No šodienas, 02.05.2017., VeA zinātņu prorektora p.i. amata pienākumus sāk pildīt Indra Dedze - kab. C 204, iekš. t. 156, pilsētas telefons 63629648 un VSRC projektu vadītāja Ieva Rozenberga - kab. D 310, iekš. t. 148. \r\nVēlam veiksmi darbā!\r\nInformācijai!\r\nArtūrs Vrubļevskis strādā D 312 kabinetā, iekš. t. 118\r\nSanta Kalvāne strādā D 312 kabinetā, iekš. t. 118', '02.05.2017 11:51', 1, 1),
(3, 'Tīmekļa tehnoloģijas NENOTIEK', 'Labvakar, slimības dēļ, rīt (03.05.2017), tīmekļa tehnoloģijas praktiskā nodarbība nenotiek. Par atstrādāšanu vienosimies vēlāk. \r\n\r\nAtvainojos par sagādātām neērtībām.', '02.05.2017 21:28', 2, 2),
(4, 'Sesijas grafiks kursu vecākajiem', 'Labdien!\r\nVeidlapa sesijas grafikam atrodama šeit:\r\nmoodle.venta.lv/moodle/course/…\r\n\r\nVisiem pārbaudījumiem jānotiek ar rektora rīkojumu noteiktajā sesijas laikā – no 01.06.2016. līdz 28.06.2017. Pirms katra eksāmena vismaz dienu iepriekš NOTEIKTI IR JĀIEPLĀNO KONSULTĀCIJA. Starp pārbaudījumiem jāplāno vismaz viena brīva diena, vēlams divas, ja tas ir iespējams. Grafiks jāsaskaņo ar fakultātes dekānu un jānodod C210.kabinetā līdz 2016.gada 15.maijam (ieskaitot).', '20.04.2017 11:16', 2, 1),
(5, 'Pārdod nieri', 'Pārdod nieri. \r\n\r\nMazliet lietota, bet labā tehniskā stāvoklī.\r\n\r\nCena: 250 000 €', '08.05.2017 13:21', 3, 1);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`ID` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`surname` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`image` varchar(250) NOT NULL,
`level` varchar(5) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`ID`, `name`, `surname`, `email`, `image`, `level`) VALUES
(1, 'Alfrēds', 'Kāpostgalva', 'alfreds@venta.lv', 'alfreds.jpg', 'admin'),
(2, 'Mārcis', 'Koloda', 'marcisk@venta.lv', 'marcis.png', 'admin');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`ID`);
--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
ADD PRIMARY KEY (`ID`),
ADD KEY `fk_comments_posts1_idx` (`posts_ID`);
--
-- Indexes for table `posts`
--
ALTER TABLE `posts`
ADD PRIMARY KEY (`ID`),
ADD KEY `fk_posts_users_idx` (`users_ID`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`ID`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `ID` int(14) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `posts`
--
ALTER TABLE `posts`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `comments`
--
ALTER TABLE `comments`
ADD CONSTRAINT `fk_comments_posts1` FOREIGN KEY (`posts_ID`) REFERENCES `posts` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Constraints for table `posts`
--
ALTER TABLE `posts`
ADD CONSTRAINT `fk_posts_users` FOREIGN KEY (`users_ID`) REFERENCES `users` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION;
/*!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 */;
-- phpMyAdmin SQL Dump
-- version 4.4.15.5
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1:3306
-- Generation Time: May 09, 2017 at 09:21 PM
-- Server version: 5.6.34-log
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `moviedb`
--
CREATE DATABASE IF NOT EXISTS `moviedb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `moviedb`;
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE IF NOT EXISTS `comments` (
`ID` int(11) NOT NULL,
`author` varchar(45) NOT NULL,
`comment` varchar(45) NOT NULL,
`commentdate` varchar(45) NOT NULL,
`movies_ID` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `comments`
--
INSERT INTO `comments` (`ID`, `author`, `comment`, `commentdate`, `movies_ID`) VALUES
(1, 'Alfrēds', 'This movie is awesome! ', '2017-05-09 23:15:47', 4),
(2, 'Antons', 'Weird tv series... ', '2017-05-09 23:16:57', 1);
-- --------------------------------------------------------
--
-- Table structure for table `movies`
--
CREATE TABLE IF NOT EXISTS `movies` (
`ID` int(11) NOT NULL,
`title` varchar(100) NOT NULL,
`genre` varchar(45) NOT NULL,
`director` text NOT NULL,
`stars` text NOT NULL,
`plot` text NOT NULL,
`image` text NOT NULL,
`trailer` text NOT NULL,
`type` varchar(45) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `movies`
--
INSERT INTO `movies` (`ID`, `title`, `genre`, `director`, `stars`, `plot`, `image`, `trailer`, `type`) VALUES
(1, 'American Gods', 'Fantasy, Mystery', 'Bryan Fuller, Michael Green', 'Ricky Whittle, Emily Browning, Bruce Langley', 'A recently released ex-convict named Shadow meets a mysterious man who calls himself "Wednesday" and who knows more than he first seems to about Shadow''s life and past.', 'http://cdn1-www.comingsoon.net/assets/uploads/gallery/american-gods/americangods2.jpg', '<iframe width="560" height="315" src="https://www.youtube.com/embed/oyoXURn9oK0" frameborder="0" allowfullscreen></iframe>', 'tv series'),
(2, 'Lucifer', 'Crime, Drama, Fantasy', 'Tom Kapinos', 'Tom Ellis, Lauren German, Kevin Alejandro |', 'Lucifer takes up residence in Los Angeles.', 'http://tvseriesfinale.com/wp-content/uploads/2016/09/lucifer05-590x257.png', '<iframe width="560" height="315" src="https://www.youtube.com/embed/X4bF_quwNtw" frameborder="0" allowfullscreen></iframe>', 'tv series'),
(3, 'Legion ', 'Action, Drama, Sci-Fi', 'Noah Hawley', 'Dan Stevens, Rachel Keller, Aubrey Plaza', 'David Haller is a troubled young man diagnosed as schizophrenic, but after a strange encounter, he discovers special powers that will change his life forever.', 'https://images.moviepilot.com/images/c_fill,h_480,w_480/t_mp_quality_gif/yyfngk1ztjayd9iiojto/which-take-on-did-do-you-prefer-1324267.jpg', '<iframe width="560" height="315" src="https://www.youtube.com/embed/9_e83uw38hs" frameborder="0" allowfullscreen></iframe>', 'tv series'),
(4, 'Guardians of the Galaxy Vol. 2', 'Action, Adventure, Sci-Fi', 'James Gunn', 'Chris Pratt, Zoe Saldana, Dave Bautista, Vin Diesel, Bradley Cooper, Michael Rooker', 'Set to the backdrop of Awesome Mixtape #2, ''Guardians of the Galaxy Vol. 2'' continues the team''s adventures as they unravel the mystery of Peter Quill''s true parentage.', 'http://bamsmackpow.com/files/2017/04/Guardians_Of_The_Galaxy_Vol_2_Official_Poster_Landscape.jpg', '<iframe width="560" height="315" src="https://www.youtube.com/embed/duGqrYw4usE" frameborder="0" allowfullscreen></iframe>', 'movie');
-- --------------------------------------------------------
--
-- Table structure for table `rating`
--
CREATE TABLE IF NOT EXISTS `rating` (
`ID` int(11) NOT NULL,
`author` varchar(45) NOT NULL,
`stars` int(11) NOT NULL,
`movies_ID` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `rating`
--
INSERT INTO `rating` (`ID`, `author`, `stars`, `movies_ID`) VALUES
(1, 'Alfrēds', 10, 4),
(2, 'Alfrēds', 8, 1),
(3, 'Antons Spainis', 8, 4),
(4, 'Antons Spainis', 9, 2);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
ADD PRIMARY KEY (`ID`),
ADD KEY `fk_comments_movies_idx` (`movies_ID`);
--
-- Indexes for table `movies`
--
ALTER TABLE `movies`
ADD PRIMARY KEY (`ID`);
--
-- Indexes for table `rating`
--
ALTER TABLE `rating`
ADD PRIMARY KEY (`ID`),
ADD KEY `fk_rating_movies1_idx` (`movies_ID`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `movies`
--
ALTER TABLE `movies`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `rating`
--
ALTER TABLE `rating`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `comments`
--
ALTER TABLE `comments`
ADD CONSTRAINT `fk_comments_movies` FOREIGN KEY (`movies_ID`) REFERENCES `movies` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Constraints for table `rating`
--
ALTER TABLE `rating`
ADD CONSTRAINT `fk_rating_movies1` FOREIGN KEY (`movies_ID`) REFERENCES `movies` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION;
/*!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 */;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment