Skip to content

Instantly share code, notes, and snippets.

@ashour
Last active March 25, 2020 13:13
Show Gist options
  • Save ashour/23e7f9d02360291be37c3ca1366e85b5 to your computer and use it in GitHub Desktop.
Save ashour/23e7f9d02360291be37c3ca1366e85b5 to your computer and use it in GitHub Desktop.
CREATE TABLE `articles_i18n` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`published_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `articles_i18n_translations` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`article_id` int(11) NOT NULL,
`locale` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL,
`title` varchar(2000) COLLATE utf8mb4_unicode_ci NOT NULL,
`body` text COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment