Refactored names of date fields, Created a ResourceManager to handle filesystem stuff

This commit is contained in:
Ziver Koc 2018-08-11 12:53:40 +02:00
parent 8212379c31
commit 0a099bd5d7
16 changed files with 2245 additions and 2214 deletions

View file

@ -13,7 +13,7 @@ CREATE TABLE `Comments` (
`image` int(11) DEFAULT NULL,
`video` int(11) DEFAULT NULL,
`user` int(11) DEFAULT NULL,
`date` datetime DEFAULT NULL,
`dateCreated` datetime DEFAULT NULL,
`message` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@ -25,7 +25,7 @@ CREATE TABLE `Comments` (
CREATE TABLE `Folder` (
`id` int(10) UNSIGNED NOT NULL,
`user` int(10) UNSIGNED DEFAULT NULL,
`owner` int(10) UNSIGNED DEFAULT NULL,
`path` text,
`parent` int(10) UNSIGNED DEFAULT NULL,
`date` datetime NOT NULL,
@ -41,12 +41,12 @@ CREATE TABLE `Folder` (
CREATE TABLE `Image` (
`id` int(10) UNSIGNED NOT NULL,
`folder` int(10) UNSIGNED NOT NULL,
`filename` varchar(45) NOT NULL,
`user` int(10) UNSIGNED NOT NULL,
`fileName` varchar(45) NOT NULL,
`fileExtension` varchar(5) NOT NULL,
`owner` int(10) UNSIGNED NOT NULL,
`title` varchar(55) DEFAULT NULL,
`description` text,
`date` datetime DEFAULT NULL,
`rating` float DEFAULT NULL
`dateUploaded` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
@ -63,7 +63,8 @@ CREATE TABLE `User` (
`passwordHash` varchar(64) DEFAULT NULL,
`passwordSalt` varchar(5) DEFAULT NULL,
`ipHost` varchar(20) DEFAULT NULL,
`loginDate` datetime DEFAULT NULL,
`dateCreated` datetime DEFAULT NULL,
`dateLastLogin` datetime DEFAULT NULL,
`cookieHash` varchar(42) DEFAULT NULL,
`superUser` tinyint(1) NOT NULL,
`enabled` tinyint(1) NOT NULL
@ -73,8 +74,8 @@ CREATE TABLE `User` (
-- Dumping data for table `User`
--
INSERT INTO `User` (`id`, `name`, `email`, `emailVerified`, `passwordHash`, `passwordSalt`, `ipHost`, `loginDate`, `cookieHash`, `superUser`, `enabled`) VALUES
(1, 'Admin Admin', 'admin', 1, '6e88be8bad7eae9d9e10aa061224034fed48d03fcbad968b56006784539d5214', 'salt', '', '1970-01-01 01:00:0', '', 1, 1);
INSERT INTO `User` (`id`, `name`, `email`, `emailVerified`, `passwordHash`, `passwordSalt`, `ipHost`, `dateCreated`, `dateLastLogin`, `cookieHash`, `superUser`, `enabled`) VALUES
(1, 'Admin Admin', 'admin', 1, '6e88be8bad7eae9d9e10aa061224034fed48d03fcbad968b56006784539d5214', 'salt', '', '1970-01-01 01:00:0', '1970-01-01 01:00:0', '', 1, 1);
-- --------------------------------------------------------
@ -85,12 +86,12 @@ INSERT INTO `User` (`id`, `name`, `email`, `emailVerified`, `passwordHash`, `pas
CREATE TABLE `Video` (
`id` int(10) UNSIGNED NOT NULL,
`folder` int(10) UNSIGNED NOT NULL,
`filename` varchar(45) NOT NULL,
`user` int(10) UNSIGNED NOT NULL,
`fileName` varchar(45) NOT NULL,
`fileExtension` varchar(5) NOT NULL,
`owner` int(10) UNSIGNED NOT NULL,
`title` varchar(55) DEFAULT NULL,
`description` text,
`date` datetime DEFAULT NULL,
`rating` float DEFAULT NULL,
`dateUploaded` datetime DEFAULT NULL
`transcoded` tinyint(1) NOT NULL DEFAULT '0',
`length` int(10) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;