Skip to content

Instantly share code, notes, and snippets.

@ddavaham
Created January 13, 2019 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddavaham/cae3f77b19e7d8df4debee5c862dd3ae to your computer and use it in GitHub Desktop.
Save ddavaham/cae3f77b19e7d8df4debee5c862dd3ae to your computer and use it in GitHub Desktop.
CREATE TABLE `types` (
`id` INT(10) UNSIGNED NOT NULL,
`name` VARCHAR(255) NOT NULL COLLATE 'utf8_unicode_ci',
`description` TEXT NULL COLLATE 'utf8_unicode_ci',
`published` TINYINT(1) NOT NULL DEFAULT '0',
`group_id` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`market_group_id` INT(10) UNSIGNED NULL DEFAULT NULL,
`volume` DOUBLE(12,4) NOT NULL DEFAULT '0.0000',
`price` DOUBLE(15,4) NOT NULL,
`packaged_volume` DOUBLE(13,4) NULL DEFAULT NULL,
`price_updated` TIMESTAMP NULL DEFAULT NULL,
`created_at` TIMESTAMP NULL DEFAULT NULL,
`updated_at` TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY (`id`)
)
COLLATE='utf8_unicode_ci'
ENGINE=InnoDB
;
CREATE TABLE `type_skillz` (
`type_id` INT(10) UNSIGNED NOT NULL,
`skill_id` INT(10) UNSIGNED NOT NULL,
`level` TINYINT(3) UNSIGNED NOT NULL,
PRIMARY KEY (`type_id`, `skill_id`),
INDEX `type_skillz_id_foreign` (`skill_id`)
)
COLLATE='utf8_unicode_ci'
ENGINE=InnoDB
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment