Last active
June 1, 2018 17:50
-
-
Save landbryo/0ab722c85861b7b4c4dbc9328b2f3290 to your computer and use it in GitHub Desktop.
Use these examples to create or modify tables in Fuel CMS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CUSTOMIZED | |
CREATE TABLE `aircraft` ( | |
`id` tinyint(3) UNSIGNED NOT NULL auto_increment, | |
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', | |
`slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | |
`content` text COLLATE utf8_unicode_ci NOT NULL, | |
`image` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | |
`thumbnail_image` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | |
`precedence` int(11) NOT NULL DEFAULT '0', | |
`published` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'yes', | |
`category_id` int(10) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; | |
# DEFAULT EXAMPLE | |
CREATE TABLE `authors` ( | |
`id` tinyint(3) unsigned NOT NULL auto_increment, | |
`name` varchar(255) collate utf8_unicode_ci NOT NULL default '', | |
`email` varchar(255) collate utf8_unicode_ci NOT NULL default '', | |
`bio` text collate utf8_unicode_ci NOT NULL default '', | |
`avatar_image` varchar(255) collate utf8_unicode_ci NOT NULL default '', | |
`published` enum('yes','no') collate utf8_unicode_ci NOT NULL default 'yes', | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; | |
# CREATE ROW IN EXISTING TABLE | |
ALTER TABLE experiences | |
ADD `excerpt` text COLLATE utf8_unicode_ci NOT NULL AFTER `content`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment