项目作者: robinp7720

项目描述 :
The world's first opensource intelligent photo gallery
高级语言: JavaScript
项目地址: git://github.com/robinp7720/PhotoHome.git
创建时间: 2017-04-27T10:40:35Z
项目社区:https://github.com/robinp7720/PhotoHome

开源协议:Apache License 2.0

下载


PhotoHome

Photo home is designed to give a home to you photo library while preserving the directory structure on you NAS. The photo files are not edited, modified or changed. Thumbnails are generated for the library view and photo information indexed into a mysql database.

Contributing

Please help! If you have an idea which should be implemented or a fix to a bug, fork the repo and send a pull request

Setup the database:

  1. --
  2. -- Database: `Photos`
  3. --
  4. CREATE DATABASE IF NOT EXISTS `Photos` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
  5. USE `Photos`;
  6. -- --------------------------------------------------------
  7. --
  8. -- Table structure for table `exif`
  9. --
  10. CREATE TABLE `exif` (
  11. `row_id` int(11) NOT NULL,
  12. `photo_id` int(11) NOT NULL,
  13. `entry` varchar(255) NOT NULL,
  14. `value` varchar(255) NOT NULL
  15. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  16. -- --------------------------------------------------------
  17. --
  18. -- Table structure for table `location`
  19. --
  20. CREATE TABLE `location` (
  21. `row_id` int(11) NOT NULL,
  22. `photo_id` int(11) NOT NULL,
  23. `countryName` varchar(255) NOT NULL,
  24. `countryCode` varchar(255) NOT NULL,
  25. `adminCode` varchar(255) NOT NULL,
  26. `adminName` varchar(255) NOT NULL,
  27. `name` varchar(255) NOT NULL
  28. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  29. -- --------------------------------------------------------
  30. --
  31. -- Table structure for table `photos`
  32. --
  33. CREATE TABLE `photos` (
  34. `id` int(11) NOT NULL,
  35. `path` varchar(255) NOT NULL,
  36. `time` datetime DEFAULT NULL,
  37. `width` int(11) NOT NULL,
  38. `height` int(11) NOT NULL
  39. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  40. -- --------------------------------------------------------
  41. --
  42. -- Table structure for table `tags`
  43. --
  44. CREATE TABLE `tags` (
  45. `row_id` int(11) NOT NULL,
  46. `photo_id` int(11) NOT NULL,
  47. `value` varchar(255) NOT NULL
  48. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  49. --
  50. -- Indexes for dumped tables
  51. --
  52. --
  53. -- Indexes for table `exif`
  54. --
  55. ALTER TABLE `exif`
  56. ADD PRIMARY KEY (`row_id`),
  57. ADD KEY `photo_id` (`photo_id`);
  58. --
  59. -- Indexes for table `location`
  60. --
  61. ALTER TABLE `location`
  62. ADD PRIMARY KEY (`row_id`),
  63. ADD UNIQUE KEY `photo_id_2` (`photo_id`),
  64. ADD KEY `photo_id` (`photo_id`);
  65. --
  66. -- Indexes for table `photos`
  67. --
  68. ALTER TABLE `photos`
  69. ADD PRIMARY KEY (`id`),
  70. ADD UNIQUE KEY `path` (`path`);
  71. --
  72. -- Indexes for table `tags`
  73. --
  74. ALTER TABLE `tags`
  75. ADD PRIMARY KEY (`row_id`),
  76. ADD KEY `photo_id` (`photo_id`);
  77. --
  78. -- AUTO_INCREMENT for dumped tables
  79. --
  80. --
  81. -- AUTO_INCREMENT for table `exif`
  82. --
  83. ALTER TABLE `exif`
  84. MODIFY `row_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=518606;
  85. --
  86. -- AUTO_INCREMENT for table `location`
  87. --
  88. ALTER TABLE `location`
  89. MODIFY `row_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2286;
  90. --
  91. -- AUTO_INCREMENT for table `photos`
  92. --
  93. ALTER TABLE `photos`
  94. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12032;
  95. --
  96. -- AUTO_INCREMENT for table `tags`
  97. --
  98. ALTER TABLE `tags`
  99. MODIFY `row_id` int(11) NOT NULL AUTO_INCREMENT;
  100. --
  101. -- Constraints for dumped tables
  102. --
  103. --
  104. -- Constraints for table `exif`
  105. --
  106. ALTER TABLE `exif`
  107. ADD CONSTRAINT `exif_ibfk_1` FOREIGN KEY (`photo_id`) REFERENCES `photos` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
  108. --
  109. -- Constraints for table `location`
  110. --
  111. ALTER TABLE `location`
  112. ADD CONSTRAINT `location_ibfk_1` FOREIGN KEY (`photo_id`) REFERENCES `photos` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;