Skip to content

Instantly share code, notes, and snippets.

@justinyost
Last active December 20, 2015 10:49
Show Gist options
  • Save justinyost/6118233 to your computer and use it in GitHub Desktop.
Save justinyost/6118233 to your computer and use it in GitHub Desktop.
CakePHP Intro for Las Vegas Users Group Commands Related Github Repo: https://github.com/jtyost2/cakephp-intro
-- Notes Table
CREATE TABLE IF NOT EXISTS `notes` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`content` text NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Tags Table
CREATE TABLE IF NOT EXISTS `tags` (
`id` CHAR(36) NOT NULL,
`name` VARCHAR(255) NOT NULL,
`created` DATETIME NOT NULL,
`modified` DATETIME NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8;
-- NotesTags Table
CREATE TABLE IF NOT EXISTS `notes_tags` (
`id` CHAR(36) NOT NULL,
`note_id` INT(10) NOT NULL,
`tag_id` CHAR(36) NOT NULL,
PRIMARY KEY (`id`),
KEY (`note_id`),
KEY (`tag_id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8;
Either
`chown -R _www ./app/tmp`
`chmod -R 777 ./app/tmp`
Cake Bake:
Console/cake -app ~/path/to/app/ bake all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment