/NewsWebsite.sql (c71119da8bc4ca18878a2644255a2943a0595f68) (3823 bytes) (mode 100644) (type blob)
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 30, 2019 at 02:07 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7
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 */;
--
-- Database: `NewsWebsite`
--
DROP DATABASE IF EXISTS `NewsWebsite`;
CREATE DATABASE IF NOT EXISTS `NewsWebsite`;
USE `NewsWebsite`;
-- --------------------------------------------------------
--
-- Table structure for table `Categories`
--
CREATE TABLE `Categories` (
`ID` int(11) NOT NULL,
`Name` varchar(30) COLLATE utf8_bin NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `Images`
--
CREATE TABLE `Images` (
`ID` int(11) NOT NULL,
`Name` varchar(32) COLLATE utf8_bin NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `News`
--
CREATE TABLE `News` (
`ID` varchar(32) COLLATE utf8_bin NOT NULL,
`Title` text COLLATE utf8_bin NOT NULL,
`Content` text COLLATE utf8_bin NOT NULL,
`Timestamp` varchar(10) COLLATE utf8_bin NOT NULL,
`ReadingTimes` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `NewsCategories`
--
CREATE TABLE `NewsCategories` (
`NewsID` varchar(32) COLLATE utf8_bin NOT NULL,
`CategoryID` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `NewsImages`
--
CREATE TABLE `NewsImages` (
`NewsID` varchar(32) COLLATE utf8_bin NOT NULL,
`ImageID` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `Categories`
--
ALTER TABLE `Categories`
ADD PRIMARY KEY (`ID`);
--
-- Indexes for table `Images`
--
ALTER TABLE `Images`
ADD PRIMARY KEY (`ID`);
--
-- Indexes for table `News`
--
ALTER TABLE `News`
ADD PRIMARY KEY (`ID`);
--
-- Indexes for table `NewsCategories`
--
ALTER TABLE `NewsCategories`
ADD KEY `CategoryID` (`CategoryID`),
ADD KEY `NewsID` (`NewsID`);
--
-- Indexes for table `NewsImages`
--
ALTER TABLE `NewsImages`
ADD KEY `ImageID` (`ImageID`),
ADD KEY `NewsID` (`NewsID`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `Categories`
--
ALTER TABLE `Categories`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `Images`
--
ALTER TABLE `Images`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `NewsCategories`
--
ALTER TABLE `NewsCategories`
ADD CONSTRAINT `newscategories_ibfk_1` FOREIGN KEY (`CategoryID`) REFERENCES `Categories` (`ID`) ON DELETE CASCADE,
ADD CONSTRAINT `newscategories_ibfk_2` FOREIGN KEY (`NewsID`) REFERENCES `News` (`ID`) ON DELETE CASCADE;
--
-- Constraints for table `NewsImages`
--
ALTER TABLE `NewsImages`
ADD CONSTRAINT `newsimages_ibfk_1` FOREIGN KEY (`ImageID`) REFERENCES `Images` (`ID`) ON DELETE CASCADE,
ADD CONSTRAINT `newsimages_ibfk_2` FOREIGN KEY (`NewsID`) REFERENCES `News` (`ID`) ON DELETE CASCADE;
COMMIT;
/*!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 */;
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
914 |
ad46b30886fa350c1f59761b100e5e4b01f9a7ec |
.gitignore |
100644 |
blob |
3823 |
c71119da8bc4ca18878a2644255a2943a0595f68 |
NewsWebsite.sql |
100644 |
blob |
65 |
fc0edb98cc538f8c2d584cabbb81abf2b4134484 |
README.md |
100644 |
blob |
2253 |
f1a2753582479d4a3d170de184da7fcbbce49c45 |
app.js |
040000 |
tree |
- |
e1267e619dcd638b99cabb2758111aed6b1f9433 |
general |
040000 |
tree |
- |
312740477a6a2e13e3fe85800a7f954e70d22d75 |
helpers |
040000 |
tree |
- |
d4977b7830c941e166788129aa5dfac159f4b73e |
models |
100644 |
blob |
109784 |
bd0d17580cc646deffdf8e6bad532fcd57a5b456 |
package-lock.json |
100644 |
blob |
540 |
62b755bc6925fbd31d121c6b4a3535322d801f53 |
package.json |
040000 |
tree |
- |
b5a4b102e6a08ada7783cd0683abfc790b27879e |
routes |
040000 |
tree |
- |
d86e002911ce5149c8bedbda7e4655b2c1de3e7a |
views |
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/EyadMohammedOsama/News-Website
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/EyadMohammedOsama/News-Website
Clone this repository using git:
git clone git://git.rocketgit.com/user/EyadMohammedOsama/News-Website
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main