CREATE TABLE IF NOT EXISTS `reminders` ( `id` int(11) NOT NULL auto_increment, `user_id` int(11) NOT NULL, `drug_id` int(11) NOT NULL, `days_of_week` varchar(7) NOT NULL, `time` time NOT NULL, `created` datetime NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Showing posts with label configuration. Show all posts
Showing posts with label configuration. Show all posts
Wednesday, November 3, 2010
Database: Setup Reminders Table
Create reminders table
Database: Setup Carriers Table
Create carriers table
CREATE TABLE IF NOT EXISTS `carriers` ( `id` int(11) NOT NULL auto_increment, `name` varchar(40) NOT NULL, `extension` varchar(30) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Database: Setup Drugs Table
Create drugs table
CREATE TABLE IF NOT EXISTS `drugs` ( `id` int(11) NOT NULL auto_increment, `name` varchar(50) NOT NULL, `brand_name` varchar(50) NULL, `indications` varchar(255) NULL, `adverse_reactions` varchar(255) NULL, `counseling_points` varchar(500) NULL, `notes` varchar(255) NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Database: Setup Users Table
Create users table
CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL auto_increment, `slug` varchar(40) NOT NULL, `username` varchar(30) NOT NULL, `password` varchar(40) NOT NULL, `first_name` varchar(40) NOT NULL, `last_name` varchar(40) NOT NULL, `email` varchar(100) NOT NULL, `email_verified` tinyint(1) NOT NULL default '0', `carrier_id` int(11) NOT NULL, `cell_number` varchar(10) NOT NULL, `modified` datetime NULL, `created` datetime NULL, PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`), UNIQUE KEY `slug` (`slug`), UNIQUE KEY `email` (`email`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;The
created and modified (or updated, either name works) fields will be filled in by CakePHP automatically, as long as they are set as DATETIME fields and default to NULL.
Long field names are separated with underscores '_' so CakePHP can easily understand them.
CakePHP: Configuration
CakePHP uses the
Make sure the
Create site database in MySQL.
Copy
Edit
Save and upload the file and test by browsing to the root page.
/app/tmp directory for a number of different operations. Model descriptions, cached views, and session information are just a few examples.
Make sure the
/app/tmp directory and all subdirectories in the Cake installation are writable by the web server user (apache).
chown -R apache /app/tmpThe Security seeds need to be set for uniqueness. Edit
/app/config/core.php
Comment out the following lines, duplicate them and change their values:
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
Configure::write('Security.cipherSeed', '76859309657453542496749683645');Upload file.
Create site database in MySQL.
Copy
/app/config/database.php.default to /app/config/database.php
Edit
/app/config/database.php
Change values for 'host', 'login', 'password', and 'database' to match your database configuration.
Save and upload the file and test by browsing to the root page.
Labels:
cakephp,
configuration,
database,
security
Subscribe to:
Posts (Atom)
