Advertisement
nocturnalmk

art my earth db structure

Apr 12th, 2014
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 6.19 KB | None | 0 0
  1. -- phpMyAdmin SQL Dump
  2. -- version 4.1.6
  3. -- http://www.phpmyadmin.net
  4. --
  5. -- Host: localhost
  6. -- Generation Time: Apr 12, 2014 at 01:48 PM
  7. -- Server version: 5.5.35-0ubuntu0.13.10.2
  8. -- PHP Version: 5.5.3-1ubuntu2.2
  9.  
  10. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  11. SET time_zone = "+00:00";
  12.  
  13. --
  14. -- Database: `artmyearth`
  15. --
  16.  
  17. -- --------------------------------------------------------
  18.  
  19. --
  20. -- Table structure for table `albumPhotos`
  21. --
  22.  
  23. CREATE TABLE IF NOT EXISTS `albumPhotos` (
  24.   `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  25.   `created_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  26.   `updated_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  27.   `user_id` INT(10) UNSIGNED NOT NULL,
  28.   `album_id` INT(10) UNSIGNED NOT NULL,
  29.   PRIMARY KEY (`id`)
  30. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
  31.  
  32. -- --------------------------------------------------------
  33.  
  34. --
  35. -- Table structure for table `albums`
  36. --
  37.  
  38. CREATE TABLE IF NOT EXISTS `albums` (
  39.   `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  40.   `created_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  41.   `updated_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  42.   `name` VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL,
  43.   `description` VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL,
  44.   `user_id` INT(10) UNSIGNED NOT NULL,
  45.   PRIMARY KEY (`id`)
  46. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
  47.  
  48. -- --------------------------------------------------------
  49.  
  50. --
  51. -- Table structure for table `comments`
  52. --
  53.  
  54. CREATE TABLE IF NOT EXISTS `comments` (
  55.   `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  56.   `created_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  57.   `updated_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  58.   `name` VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL,
  59.   `user_id` INT(10) UNSIGNED NOT NULL,
  60.   `photo_id` INT(10) UNSIGNED NOT NULL,
  61.   PRIMARY KEY (`id`)
  62. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
  63.  
  64. -- --------------------------------------------------------
  65.  
  66. --
  67. -- Table structure for table `favourites`
  68. --
  69.  
  70. CREATE TABLE IF NOT EXISTS `favourites` (
  71.   `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  72.   `created_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  73.   `updated_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  74.   `user_id` INT(10) UNSIGNED NOT NULL,
  75.   `photos_id` INT(10) UNSIGNED NOT NULL,
  76.   PRIMARY KEY (`id`)
  77. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
  78.  
  79. -- --------------------------------------------------------
  80.  
  81. --
  82. -- Table structure for table `follows`
  83. --
  84.  
  85. CREATE TABLE IF NOT EXISTS `follows` (
  86.   `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  87.   `created_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  88.   `updated_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  89.   `follower_id` INT(10) UNSIGNED NOT NULL,
  90.   `follows_id` INT(10) UNSIGNED NOT NULL,
  91.   PRIMARY KEY (`id`)
  92. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
  93.  
  94. -- --------------------------------------------------------
  95.  
  96. --
  97. -- Table structure for table `migrations`
  98. --
  99.  
  100. CREATE TABLE IF NOT EXISTS `migrations` (
  101.   `migration` VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL,
  102.   `batch` INT(11) NOT NULL
  103. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  104.  
  105. --
  106. -- Dumping data for table `migrations`
  107. --
  108.  
  109. INSERT INTO `migrations` (`migration`, `batch`) VALUES
  110. ('2014_04_12_123633_create_users_table', 1),
  111. ('2014_04_12_130235_create_photos_table', 1),
  112. ('2014_04_12_130254_create_albums_table', 1),
  113. ('2014_04_12_130313_create_tags_table', 1),
  114. ('2014_04_12_131653_create_comments_table', 1),
  115. ('2014_04_12_131709_create_tagged_table', 1),
  116. ('2014_04_12_131746_create_album_photos_table', 1),
  117. ('2014_04_12_131802_create_favourites_table', 1),
  118. ('2014_04_12_131813_create_follows_table', 1);
  119.  
  120. -- --------------------------------------------------------
  121.  
  122. --
  123. -- Table structure for table `photos`
  124. --
  125.  
  126. CREATE TABLE IF NOT EXISTS `photos` (
  127.   `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  128.   `created_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  129.   `updated_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  130.   `url` VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL,
  131.   `description` VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL,
  132.   `longLat` VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL,
  133.   `flickr_id` VARCHAR(15) COLLATE utf8_unicode_ci DEFAULT NULL,
  134.   PRIMARY KEY (`id`)
  135. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
  136.  
  137. -- --------------------------------------------------------
  138.  
  139. --
  140. -- Table structure for table `tagged`
  141. --
  142.  
  143. CREATE TABLE IF NOT EXISTS `tagged` (
  144.   `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  145.   `created_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  146.   `updated_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  147.   `tag_id` INT(10) UNSIGNED NOT NULL,
  148.   `user_id` INT(10) UNSIGNED NOT NULL,
  149.   PRIMARY KEY (`id`)
  150. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
  151.  
  152. -- --------------------------------------------------------
  153.  
  154. --
  155. -- Table structure for table `tags`
  156. --
  157.  
  158. CREATE TABLE IF NOT EXISTS `tags` (
  159.   `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  160.   `created_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  161.   `updated_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  162.   `name` VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL,
  163.   PRIMARY KEY (`id`)
  164. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
  165.  
  166. -- --------------------------------------------------------
  167.  
  168. --
  169. -- Table structure for table `users`
  170. --
  171.  
  172. CREATE TABLE IF NOT EXISTS `users` (
  173.   `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  174.   `name` VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL,
  175.   `surname` VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL,
  176.   `email` VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL,
  177.   `password` VARCHAR(100) COLLATE utf8_unicode_ci NOT NULL,
  178.   `admin` tinyint(1) NOT NULL,
  179.   `created_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  180.   `updated_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  181.   PRIMARY KEY (`id`)
  182. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement