Skip to content

Instantly share code, notes, and snippets.

@nexeck
Created December 7, 2011 23:12
Show Gist options
  • Select an option

  • Save nexeck/1445217 to your computer and use it in GitHub Desktop.

Select an option

Save nexeck/1445217 to your computer and use it in GitHub Desktop.
Greyhole Initial Import MySQL
CREATE DATABASE IF NOT EXISTS `greyhole`;
GRANT USAGE ON * . * TO 'greyhole'@'localhost' IDENTIFIED BY 'some_pass' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
GRANT ALL PRIVILEGES ON `greyhole` . * TO 'greyhole'@'localhost';
CREATE TABLE IF NOT EXISTS `greyhole`.`settings` (
`name` TINYTEXT NOT NULL,
`value` TEXT NOT NULL,
PRIMARY KEY ( `name`(255) )
) ENGINE = MYISAM;
INSERT IGNORE INTO `greyhole`.`settings` (`name`, `value`) VALUES ('last_read_log_smbd_line', '0');
INSERT IGNORE INTO `greyhole`.`settings` (`name`, `value`) VALUES ('last_OOS_notification', '0');
CREATE TABLE IF NOT EXISTS `greyhole`.`tasks` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`action` varchar(10) NOT NULL,
`share` tinytext NOT NULL,
`full_path` tinytext,
`additional_info` tinytext,
`complete` enum('yes','no','frozen','thawed','idle') NOT NULL,
`event_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `find_next_task` (`complete`,`share`(64),`id`)
) ENGINE=MyISAM;
CREATE TABLE IF NOT EXISTS `greyhole`.`tasks_completed` (
`id` BIGINT UNSIGNED NOT NULL,
`action` VARCHAR( 10 ) NOT NULL,
`share` TINYTEXT NOT NULL,
`full_path` TINYTEXT NULL,
`additional_info` TINYTEXT NULL,
`complete` ENUM( 'yes', 'no' ) NOT NULL,
`event_date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE = MYISAM;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment