MySQLStorage.sql 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. DROP TABLE IF EXISTS `elfinder_file`;
  2. CREATE TABLE IF NOT EXISTS `elfinder_file` (
  3. `id` int(7) unsigned NOT NULL auto_increment,
  4. `parent_id` int(7) unsigned NOT NULL,
  5. `name` varchar(255) NOT NULL,
  6. `content` longblob NOT NULL,
  7. `size` int(10) unsigned NOT NULL default '0',
  8. `mtime` int(10) unsigned NOT NULL default '0',
  9. `mime` varchar(256) NOT NULL default 'unknown',
  10. `read` enum('1', '0') NOT NULL default '1',
  11. `write` enum('1', '0') NOT NULL default '1',
  12. `locked` enum('1', '0') NOT NULL default '0',
  13. `hidden` enum('1', '0') NOT NULL default '0',
  14. `width` int(5) NOT NULL default '0',
  15. `height` int(5) NOT NULL default '0',
  16. PRIMARY KEY (`id`),
  17. UNIQUE KEY `parent_name` (`parent_id`, `name`),
  18. KEY `parent_id` (`parent_id`)
  19. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
  20. INSERT INTO `elfinder_file`
  21. (`id`, `parent_id`, `name`, `content`, `size`, `mtime`, `mime`, `read`, `write`, `locked`, `hidden`, `width`, `height`) VALUES
  22. ('1' , '0', 'DATABASE', '', '0', '0','directory', '1', '1', '0', '0', '0', '0');
  23. DROP TABLE IF EXISTS `elfinder_trash`;
  24. CREATE TABLE IF NOT EXISTS `elfinder_trash` (
  25. `id` int(7) unsigned NOT NULL auto_increment,
  26. `parent_id` int(7) unsigned NOT NULL,
  27. `name` varchar(255) NOT NULL,
  28. `content` longblob NOT NULL,
  29. `size` int(10) unsigned NOT NULL default '0',
  30. `mtime` int(10) unsigned NOT NULL default '0',
  31. `mime` varchar(256) NOT NULL default 'unknown',
  32. `read` enum('1', '0') NOT NULL default '1',
  33. `write` enum('1', '0') NOT NULL default '1',
  34. `locked` enum('1', '0') NOT NULL default '0',
  35. `hidden` enum('1', '0') NOT NULL default '0',
  36. `width` int(5) NOT NULL default '0',
  37. `height` int(5) NOT NULL default '0',
  38. PRIMARY KEY (`id`),
  39. UNIQUE KEY `parent_name` (`parent_id`, `name`),
  40. KEY `parent_id` (`parent_id`)
  41. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
  42. INSERT INTO `elfinder_trash`
  43. (`id`, `parent_id`, `name`, `content`, `size`, `mtime`, `mime`, `read`, `write`, `locked`, `hidden`, `width`, `height`) VALUES
  44. ('1' , '0', 'DB Trash', '', '0', '0','directory', '1', '1', '0', '0', '0', '0');