Skip to content

Instantly share code, notes, and snippets.

@daum
Created May 12, 2016 13:12
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 daum/706569d9cf145c2faa3a14026c0d0f85 to your computer and use it in GitHub Desktop.
Save daum/706569d9cf145c2faa3a14026c0d0f85 to your computer and use it in GitHub Desktop.
CREATE TABLE `example_entity` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `example_entity_translation` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`translatable_id` int(11) DEFAULT NULL,
`visible_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`locale` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `example_entity_translation_unique_translation` (`translatable_id`,`locale`),
KEY `IDX_36C072052C2AC5D3` (`translatable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment